eskim vor 5 Jahren
Ursprung
Commit
b6516f1ec2
18 geänderte Dateien mit 6027 neuen und 559 gelöschten Zeilen
  1. 25 0
      style24.scm/src/main/java/com/style24/persistence/domain/BrandMd.java
  2. 1 504
      style24.scm/src/main/java/com/style24/persistence/mybatis/shop/TssBusiness.xml
  3. 1 0
      style24.scm/src/main/java/com/style24/persistence/mybatis/shop/TssCommon.xml
  4. 1 16
      style24.scm/src/main/java/com/style24/persistence/mybatis/shop/TssRenderer.xml
  5. 31 0
      style24.scm/src/main/java/com/style24/persistence/mybatis/shop/TssSystem.xml
  6. 18 17
      style24.scm/src/main/java/com/style24/scm/biz/dao/TssBusinessDao.java
  7. 286 0
      style24.scm/src/main/java/com/style24/scm/biz/dao/TssSystemDao.java
  8. 22 21
      style24.scm/src/main/java/com/style24/scm/biz/service/TssBusinessService.java
  9. 0 1
      style24.scm/src/main/java/com/style24/scm/biz/service/TssCommonService.java
  10. 484 0
      style24.scm/src/main/java/com/style24/scm/biz/service/TssSystemService.java
  11. 67 0
      style24.scm/src/main/java/com/style24/scm/biz/web/TssGoodsController.java
  12. 1979 0
      style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsDetailForm.html
  13. 626 0
      style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsDetailImageForm.html
  14. 155 0
      style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsDetailSizeStockForm.html
  15. 1009 0
      style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsListForm.html
  16. 430 0
      style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsMassRegisterForm.html
  17. 548 0
      style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsPopupListForm.html
  18. 344 0
      style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsSupplyPriceForm.html

+ 25 - 0
style24.scm/src/main/java/com/style24/persistence/domain/BrandMd.java

@@ -0,0 +1,25 @@
+package com.style24.persistence.domain;
+
+import com.style24.persistence.TscBaseDomain;
+
+import lombok.Data;
+
+/**
+ * 브랜드담당MD Domain
+ *
+ * @author gagamel
+ * @since 2020. 11. 4
+ */
+@SuppressWarnings("serial")
+@Data
+public class BrandMd extends TscBaseDomain {
+
+	private String brandCd;		// 브랜드코드
+	private String formalGb;	// 정상이월구분
+	private String mdNo;		// MD번호
+
+	// 담당MD 화면에서 사용
+	private String mdNm;		// MD명
+	private String callbackFn;	// 콜백함수
+
+}

+ 1 - 504
style24.scm/src/main/java/com/style24/persistence/mybatis/shop/TssBusiness.xml

@@ -182,136 +182,8 @@
 		WHERE  SUPPLY_COMP_CD = #{supplyCompCd}
 	</update>
 	
-	<!-- 출고처 목록 -->
-	<select id="getDeliveryLocList" parameterType="DeliveryLoc" resultType="DeliveryLoc">
-		/* TsaBusiness.getDeliveryLocList */
-		SELECT DELV_LOC_CD        /*출고처코드*/
-		     , DELV_LOC_NM        /*출고처명*/
-		     , SUPPLY_COMP_CD     /*공급업체코드*/
-		     , DELV_LOC_CLSF      /*출고처분류*/
-		     , DELV_ASSIGN_ORD    /*출고지정순서*/
-		     , DELV_ASSIGN_GRADE  /*출고지정등급*/
-		     , STOCK_APPL_RATE    /*재고적용율*/
-		     , DELV_FEE_RATE      /*출고수수료율*/
-		     , DELV_LOC_ZIPCODE   /*출고처우편번호*/
-		     , DELV_LOC_BASE_ADDR /*출고처기본주소*/
-		     , DELV_LOC_DTL_ADDR  /*출고처상세주소*/
-		     , RTN_LOC_ZIPCODE    /*반품처우편번호*/
-		     , RTN_LOC_BASE_ADDR  /*반품처기본주소*/
-		     , RTN_LOC_DTL_ADDR   /*반품처상세주소*/
-		     , RTN_LOC_NM         /*반품처명*/
-		     , INVOICE_PRINT_TYPE /*송장출력형태*/
-		     , USE_YN             /*사용여부*/
-		FROM   TB_DELIVERY_LOC
-		WHERE  1 = 1
-		<if test="supplyCompCd != null and supplyCompCd != ''">
-		AND    LOWER(SUPPLY_COMP_CD) LIKE CONCAT('%',LOWER(#{supplyCompCd}),'%')
-		</if>
-		<if test="delvLocNm != null and delvLocNm !=''">
-		AND    LOWER(DELV_LOC_NM) LIKE CONCAT('%',LOWER(#{delvLocNm}),'%')
-		</if>
-		<if test="delvLocClsf != null and delvLocClsf != ''">
-		AND    DELV_LOC_CLSF = #{delvLocClsf}
-		</if>
-		<if test="useYn != null and useYn != ''">
-		AND    USE_YN = #{useYn}
-		</if>
-		ORDER  BY DELV_LOC_CD
-	</select>
 
-	<!-- 출고처 저장 -->
-	<insert id="saveDeliveryLoc" parameterType="DeliveryLoc">
-		/*  TsaBusiness.saveDeliveryInfo */
-		INSERT INTO TB_DELIVERY_LOC (
-		       DELV_LOC_CD
-		     , DELV_LOC_NM
-		     , SUPPLY_COMP_CD
-		     , DELV_LOC_CLSF
-		     , DELV_ASSIGN_ORD
-		     , DELV_ASSIGN_GRADE
-		     , STOCK_APPL_RATE
-		     , DELV_FEE_RATE
-		     , DELV_LOC_ZIPCODE
-		     , DELV_LOC_BASE_ADDR
-		     , DELV_LOC_DTL_ADDR
-		     , RTN_LOC_ZIPCODE
-		     , RTN_LOC_BASE_ADDR
-		     , RTN_LOC_DTL_ADDR
-		     , RTN_LOC_NM
-		     , INVOICE_PRINT_TYPE
-		     , USE_YN
-		     , REG_NO
-		     , REG_DT
-		     , UPD_NO
-		     , UPD_DT
-		)
-		VALUES (
-		       #{delvLocCd}
-		     , #{delvLocNm}
-		     , #{supplyCompCd}
-		     , #{delvLocClsf}
-		     , CASE WHEN #{delvLocClsf} IN ('G024_10','G024_21') THEN /*물류창고,직송매장*/
-		                IFNULL(#{delvAssignOrd},100)
-		            ELSE
-		                #{delvAssignOrd}
-		       END
-		     , #{delvAssignGrade}
-		     , CASE WHEN #{delvLocClsf} IN ('G024_10','G024_21') AND #{stockApplRate} = 0.0 THEN /*물류창고,직송매장*/
-		                IFNULL(#{stockApplRate},100.0)
-		            ELSE
-		                #{stockApplRate}
-		       END
-		     , CASE WHEN #{delvLocClsf} = 'G024_21' THEN /*직송매장*/
-		                IFNULL(#{delvFeeRate},0.0)
-		            ELSE
-		                #{delvFeeRate}
-		       END
-		     , #{delvLocZipcode}
-		     , #{delvLocBaseAddr}
-		     , #{delvLocDtlAddr}
-		     , #{rtnLocZipcode}
-		     , #{rtnLocBaseAddr}
-		     , #{rtnLocDtlAddr}
-		     , #{rtnLocNm}
-		     , #{invoicePrintType}
-		     , #{useYn}
-		     , #{regNo}
-		     , NOW()
-		     , #{updNo}
-		     , NOW()
-		)
-		ON DUPLICATE KEY UPDATE
-		       DELV_LOC_NM = #{delvLocNm}
-		     , DELV_LOC_CLSF = #{delvLocClsf}
-		     , DELV_ASSIGN_ORD = CASE WHEN #{delvLocClsf} IN ('G024_10','G024_21') THEN /*물류창고,직송매장*/
-		                                  IFNULL(#{delvAssignOrd},100)
-		                              ELSE
-		                                  #{delvAssignOrd}
-		                         END
-		     , DELV_ASSIGN_GRADE = #{delvAssignGrade}
-		     , STOCK_APPL_RATE = CASE WHEN #{delvLocClsf} IN ('G024_10','G024_21') AND #{stockApplRate} = 0.0 THEN /*물류창고,직송매장*/
-		                                  100
-		                              ELSE
-		                                  #{stockApplRate}
-		                         END
-		     , DELV_FEE_RATE = CASE WHEN #{delvLocClsf} = 'G024_21' THEN /*직송매장*/
-		                                IFNULL(#{delvFeeRate},0.0)
-		                            ELSE
-		                                #{delvFeeRate}
-		                       END
-		     , DELV_LOC_ZIPCODE = #{delvLocZipcode}
-		     , DELV_LOC_BASE_ADDR = #{delvLocBaseAddr}
-		     , DELV_LOC_DTL_ADDR = #{delvLocDtlAddr}
-		     , RTN_LOC_ZIPCODE = #{rtnLocZipcode}
-		     , RTN_LOC_BASE_ADDR = #{rtnLocBaseAddr}
-		     , RTN_LOC_DTL_ADDR = #{rtnLocDtlAddr}
-		     , RTN_LOC_NM = #{rtnLocNm}
-		     , INVOICE_PRINT_TYPE = #{invoicePrintType}
-		     , USE_YN = #{useYn}
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-	</insert>
-	
+
 	<!-- 브랜드 목록 -->
 	<select id="getBrandList" parameterType="Brand" resultType="Brand">
 		/* TsaBusiness.getBrandList */
@@ -430,381 +302,6 @@
 		AND    USE_YN = 'Y'
 	</insert>
 	
-	<!-- 브랜드 노출사이트 목록 -->
-	<select id="getBrandSiteList" parameterType="String" resultType="SiteBrand">
-		/* TsaBusiness.getBrandSiteList */
-		SELECT BRAND_CD
-		     , SITE_CD
-		     , DISP_ORD
-		     , USE_YN
-		     , CATE1_NO
-		FROM   TB_SITE_BRAND
-		WHERE  BRAND_CD = #{brandCd}
-		AND    USE_YN ='Y'
-	</select>
 	
-	<!-- 브랜드 노출사이트 등록/수정 -->
-	<insert id="saveBrandSite" parameterType="SiteBrand">
-		/* TsaBusiness.saveBrandSite */
-		INSERT INTO TB_SITE_BRAND (
-		       SITE_CD
-		     , BRAND_CD
-		     , DISP_ORD
-		     , USE_YN
-		     , CATE1_NO
-		     , REG_NO
-		     , REG_DT
-		     , UPD_NO
-		     , UPD_DT
-		)
-		VALUES (
-		       #{siteCd}
-		     , #{brandCd}
-		     , #{dispOrd}
-		     , #{useYn}
-		     , #{cate1No}
-		     , #{regNo}
-		     , NOW()
-		     , #{updNo}
-		     , NOW()
-		)
-		ON DUPLICATE KEY UPDATE
-		       USE_YN = #{useYn}
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-	</insert>
-	
-	<!-- 브랜드 등록 -->
-	<insert id="createBrand" parameterType="Brand">
-		/* TsaBusiness.createBrand */
-		INSERT INTO TB_BRAND (
-		       BRAND_CD
-		     , BRAND_ENM
-		     , BRAND_KNM
-		     , BRAND_GRP_NM
-		     , SUPPLY_COMP_CD
-		     , DISTRIBUTION_GB
-		     , SELF_YN
-		     , ERP_BRAND_CD
-		     , MIN_ORD_AMT
-		     , DELV_FEE
-		     , DELV_LOC_CD
-		     , SELL_FEE_RATE
-		     , PNT_PRATE10
-		     , PNT_MRATE10
-		     , PNT_PRATE20
-		     , PNT_MRATE20
-		     , DISP_ORD
-		     , USE_YN
-		     , REG_NO
-		     , REG_DT
-		     , UPD_NO
-		     , UPD_DT
-		)
-		VALUES (
-		       (SELECT CONCAT(#{brandGb},IFNULL(LPAD(CAST(SUBSTRING(MAX(BRAND_CD),2) AS UNSIGNED) + 1,3,'0'),'000'))
-		        FROM   TB_BRAND Z
-		        WHERE  BRAND_CD LIKE CONCAT(#{brandGb},'%')
-		       )
-		     , #{brandEnm}
-		     , #{brandKnm}
-		     , #{brandGrpNm}
-		     , #{supplyCompCd}
-		     , #{distributionGb}
-		     , CASE WHEN #{distributionGb} IN ('G065_10','G065_11','G065_12') THEN 'Y'
-		            ELSE 'N'
-		       END
-		     , #{erpBrandCd}
-		     , IFNULL(#{minOrdAmt},0)
-		     , IFNULL(#{delvFee},0)
-		     , #{delvLocCd}
-		     , IFNULL(#{sellFeeRate},0)
-		     , IFNULL(#{pntPrate10},0)
-		     , IFNULL(#{pntMrate10},0)
-		     , IFNULL(#{pntPrate20},0)
-		     , IFNULL(#{pntMrate20},0)
-		     , #{dispOrd}
-		     , #{useYn}
-		     , #{regNo}
-		     , NOW()
-		     , #{updNo}
-		     , NOW()
-		)
-	</insert>
-	
-	<!-- 브랜드 수정 -->
-	<insert id="updateBrand" parameterType="Brand">
-		/* TsaBusiness.updateBrand */
-		UPDATE TB_BRAND
-		SET    BRAND_ENM = #{brandEnm}
-		     , BRAND_KNM = #{brandKnm}
-		     , BRAND_GRP_NM = #{brandGrpNm}
-		     , SUPPLY_COMP_CD = #{supplyCompCd}
-		     , DISTRIBUTION_GB = #{distributionGb}
-		     , SELF_YN = CASE WHEN #{distributionGb} IN ('G065_10','G065_11','G065_12') THEN 'Y'
-		                      ELSE 'N'
-		                 END
-		     , ERP_BRAND_CD = #{erpBrandCd}
-		     , MIN_ORD_AMT = IFNULL(#{minOrdAmt},0)
-		     , DELV_FEE = IFNULL(#{delvFee},0)
-		     , DELV_LOC_CD = #{delvLocCd}
-		     , SELL_FEE_RATE = IFNULL(#{sellFeeRate},0)
-		     , PNT_PRATE10 = IFNULL(#{pntPrate10},0)
-		     , PNT_MRATE10 = IFNULL(#{pntMrate10},0)
-		     , PNT_PRATE20 = IFNULL(#{pntPrate20},0)
-		     , PNT_MRATE20 = IFNULL(#{pntMrate20},0)
-		     , DISP_ORD = #{dispOrd}
-		     , USE_YN = #{useYn}
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-		WHERE  BRAND_CD = #{brandCd}
-	</insert>
-	
-	<!-- 재고연계관리 - 출고처 목록 -->
-	<select id="getStockSyncDeliveryLocList" parameterType="DeliveryLoc" resultType="DeliveryLoc">
-		/* TsaBusiness.getStockSyncDeliveryLocList */
-		SELECT SUPPLY_COMP_CD
-		     , DELV_LOC_CD
-		     , DELV_LOC_NM
-		     , DELV_LOC_CLSF
-		     , FN_GET_CODE_NM('G024',DELV_LOC_CLSF) AS DELV_LOC_CLSF_NM
-		FROM   TB_DELIVERY_LOC
-		WHERE  SUPPLY_COMP_CD = #{supplyCompCd}
-		AND    DELV_LOC_CLSF IN ('G024_10','G024_21') /*물류창고,직송매장*/
-		<if test="delvLocClsf != null and delvLocClsf != ''">
-		AND    DELV_LOC_CLSF = #{delvLocClsf}
-		</if>
-		<if test="searchTxt != null and searchTxt != ''">
-		    <if test="searchGb == 'CODE'">
-		AND    DELV_LOC_CD = #{delvLocCd}
-		    </if>
-		    <if test="searchGb == 'NAME'">
-		AND    DELV_LOC_NM like CONCAT('%',#{delvLocNm},'%')
-		    </if>
-		</if>
-		AND    USE_YN = 'Y'
-		ORDER  BY DELV_LOC_NM
-	</select>
-
-	<!-- 재고연계관리 - 재고연계기준 목록 -->
-	<select id="getStockSyncBaseList" parameterType="StockSyncBase" resultType="StockSyncBase">
-		/* TsaBusiness.getStockSyncBaseList */
-		SELECT X.DELV_LOC_CD
-		     , X.BRAND_CD
-		     , X.ERP_BRAND_CD
-		     , X.BRAND_KNM
-		     , X.BRAND_ENM
-		     , IFNULL(Y.STOCK_SYNC_YN,'N') AS PREV_STOCK_SYNC_YN /*이전재고연계여부*/
-		     , IFNULL(Y.STOCK_SYNC_YN,'N') AS STOCK_SYNC_YN      /*재고연계여부*/
-		     , IFNULL(Y.DELV_SYNC_YN,'N')  AS PREV_DELV_SYNC_YN  /*이전출고연계여부*/
-		     , IFNULL(Y.DELV_SYNC_YN,'N')  AS DELV_SYNC_YN       /*출고연계여부*/
-		FROM   (
-		        SELECT A.DELV_LOC_CD
-		             , B.BRAND_CD
-		             , B.ERP_BRAND_CD
-		             , B.BRAND_KNM
-		             , B.BRAND_ENM
-		        FROM   TB_DELIVERY_LOC A
-		             , TB_BRAND B
-		        WHERE  A.SUPPLY_COMP_CD = B.SUPPLY_COMP_CD
-		        AND    A.SUPPLY_COMP_CD = #{supplyCompCd}
-		        AND    A.DELV_LOC_CD = #{delvLocCd}
-		        AND    A.USE_YN = 'Y'
-		       ) X
-		LEFT OUTER JOIN TB_STOCK_SYNC_BASE Y ON X.DELV_LOC_CD = Y.DELV_LOC_CD
-		                                    AND X.BRAND_CD = Y.BRAND_CD
-		ORDER BY X.DELV_LOC_CD, X.BRAND_CD
-	</select>
-
-	<!-- 재고연계관리 - 재고연계기준 저장 -->
-	<insert id="saveStockSyncBase" parameterType="StockSyncBase">
-		/* TsaBusiness.saveStockSyncBase */
-		INSERT INTO TB_STOCK_SYNC_BASE (
-		       DELV_LOC_CD
-		     , BRAND_CD
-		     , FORMAL_GB
-		     , STOCK_SYNC_YN
-		     , DELV_SYNC_YN
-		     , REG_NO
-		     , REG_DT
-		     , UPD_NO
-		     , UPD_DT
-		)
-		VALUES (
-		       #{delvLocCd}
-		     , #{brandCd}
-		     , IFNULL(#{formalGb},'G009_10')
-		     , #{stockSyncYn}
-		     , #{delvSyncYn}
-		     , #{regNo}
-		     , NOW()
-		     , #{updNo}
-		     , NOW()
-		)
-		ON DUPLICATE KEY UPDATE
-		       STOCK_SYNC_YN = #{stockSyncYn}
-		     , DELV_SYNC_YN = #{delvSyncYn}
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-	</insert>
-
-	<!-- 판매매장 목록  -->
-	<select id="getSellStoreList" parameterType="SellStore" resultType="SellStore">
-		/* TsaBusiness.getSellStoreList */
-		SELECT SELL_STORE_CD
-		     , SELL_STORE_NM
-		     , USE_YN
-		FROM   TB_SELL_STORE
-		WHERE  1 = 1
-		<if test="sellStoreNm != null and sellStoreNm != ''">
-		AND    LOWER(SELL_STORE_NM) LIKE CONCAT('%',LOWER(#{sellStoreNm}),'%')
-		</if>
-		<if test="useYn != null and useYn != ''">
-		AND    USE_YN = #{useYn}
-		</if>
-		ORDER  BY SELL_STORE_NM
-	</select>
-
-	<!-- 판매매장 등록/수정 -->
-	<insert id="saveSellStore" parameterType="SellStore">
-		/* TsaBusiness.saveSellStore */
-		INSERT INTO TB_SELL_STORE (
-		       SUPPLY_COMP_CD
-		     , SELL_STORE_CD
-		     , SELL_STORE_NM
-		     , USE_YN
-		     , REG_NO
-		     , REG_DT
-		     , UPD_NO
-		     , UPD_DT
-		)
-		VALUES (
-		       #{supplyCompCd}
-		     , #{sellStoreCd}
-		     , #{sellStoreNm}
-		     , #{useYn}
-		     , #{regNo}
-		     , NOW()
-		     , #{updNo}
-		     , NOW()
-		)
-		ON DUPLICATE KEY UPDATE
-		       SELL_STORE_CD = #{sellStoreCd}
-		     , SELL_STORE_NM = #{sellStoreNm}
-		     , USE_YN = #{useYn}
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-	</insert>
-	
-	<!-- 제휴링크 목록 -->
-	<select id="getAflinkList" parameterType="Aflink" resultType="Aflink">
-		/*  TsaBusiness.getAflinkList */
-		SELECT AF_LINK_CD
-		     , AF_LINK_NM
-		     , AF_CHANNEL
-		     , DISP_ORD
-		     , USE_YN
-		FROM   TB_AF_LINK
-		WHERE  1 = 1
-		<if test="afChannel != null and afChannel != ''">
-		AND    AF_CHANNEL = #{afChannel}
-		</if>
-	</select>
-
-	<!-- 제휴링크 저장 -->
-	<insert id="saveAflink" parameterType="Aflink">
-		/* TsaBusiness.saveAflink */
-		INSERT INTO TB_AF_LINK (
-		       AF_LINK_CD
-		     , AF_LINK_NM
-		     , AF_CHANNEL
-		     , DISP_ORD
-		     , USE_YN
-		     , REG_NO
-		     , REG_DT
-		     , UPD_NO
-		     , UPD_DT
-		)
-		VALUES (
-		       #{afLinkCd}
-		     , #{afLinkNm}
-		     , #{afChannel}
-		     , #{dispOrd}
-		     , #{useYn}
-		     , #{regNo}
-		     , NOW()
-		     , #{updNo}
-		     , NOW()
-		)
-		ON DUPLICATE KEY UPDATE
-		       AF_LINK_NM = #{afLinkNm}
-		     , AF_CHANNEL = #{afChannel}
-		     , DISP_ORD = #{dispOrd}
-		     , USE_YN = #{useYn}
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-	</insert>
-
-	<!-- 제휴링크 삭제 -->
-	<update id="deleteAflink" parameterType="Aflink">
-		/* TsaBusiness.deleteAflink */
-		UPDATE TB_AF_LINK
-		SET    USE_YN = 'N'
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-		WHERE  AF_LINK_CD = #{afLinkCd}
-	</update>
-	
-	<!-- 배송업체관리 목록 -->
-	<select id="getShipCompanyList" resultType="ShipCompany">
-		/* TsaBusiness.getShipCompanyList */
-		SELECT SHIP_COMP_CD
-		     , SHIP_COMP_NM
-		     , TRACKING_URL
-		     , USE_YN
-		FROM   TB_SHIP_COMPANY
-		ORDER  BY SHIP_COMP_CD
-	</select>
-
-	<!-- 배송업체관리 저장 -->
-	<insert id="saveShipCompany" parameterType="ShipCompany">
-		/* TsaBusiness.saveShipCompany */
-		INSERT INTO TB_SHIP_COMPANY (
-		       SHIP_COMP_CD
-		     , SHIP_COMP_NM
-		     , TRACKING_URL
-		     , USE_YN
-		     , REG_NO
-		     , REG_DT
-		     , UPD_NO
-		     , UPD_DT
-		)
-		VALUES (
-		       #{shipCompCd}
-		     , #{shipCompNm}
-		     , #{trackingUrl}
-		     , #{useYn}
-		     , #{regNo}
-		     , NOW()
-		     , #{updNo}
-		     , NOW()
-		)
-		ON DUPLICATE KEY UPDATE
-		       SHIP_COMP_NM = #{shipCompNm}
-		     , TRACKING_URL = #{trackingUrl}
-		     , USE_YN = #{useYn}
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-	</insert>
-	
-	<!-- 배송업체관리 삭제 -->
-	<update id="deleteShipCompany" parameterType="ShipCompany">
-		/* TsaBusiness.updateShipCompany */
-		UPDATE TB_SHIP_COMPANY
-		SET    USE_YN = 'N'
-		     , UPD_NO = #{updNo}
-		     , UPD_DT = NOW()
-		WHERE  SHIP_COMP_CD=  #{shipCompCd}
-	</update>
 	
 </mapper>

+ 1 - 0
style24.scm/src/main/java/com/style24/persistence/mybatis/shop/TssCommon.xml

@@ -71,4 +71,5 @@
 		WHERE CD_GB = 'G077'
 		AND CD = 'ERPSYNCYN'
 	</select>
+	
 </mapper>

+ 1 - 16
style24.scm/src/main/java/com/style24/persistence/mybatis/shop/TssRenderer.xml

@@ -176,22 +176,7 @@
 		ORDER  BY A.BRAND_CD
 	</select>
 
-	<!-- 출고처 목록 -->
-	<select id="getDeliveryLocList" parameterType="DeliveryLoc" resultType="CommonCode">
-		/* TsaRenderer.getDeliveryLocList */
-		SELECT DELV_LOC_CD AS CD
-		     , DELV_LOC_NM AS CD_NM
-		FROM   TB_DELIVERY_LOC
-		WHERE  USE_YN = 'Y'
-		<if test='supplyCompCd != null and supplyCompCd != ""'>
-		AND    SUPPLY_COMP_CD = #{supplyCompCd}
-		</if>
-		<if test='delvLocClsf != null and delvLocClsf != ""'>
-		AND    DELV_LOC_CLSF = #{delvLocClsf}
-		</if>
-		ORDER  BY DELV_LOC_NM
-	</select>
-
+	
 	<!-- 정보고시 목록 -->
 	<select id="getCateInfoList" parameterType="String" resultType="CommonCode">
 		/* TsaRenderer.getCateInfoList */

+ 31 - 0
style24.scm/src/main/java/com/style24/persistence/mybatis/shop/TssSystem.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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.TsaSystemDao">
+
+	<!-- 사용자 조회 -->
+	<select id="getUser" parameterType="Integer" resultType="User">
+		/* TsaSystem.getUser */
+		SELECT USER_NO                                                         /*사용자번호*/
+		     , USER_ID                                                         /*사용자ID*/
+		     , USER_NM                                                         /*사용자명*/
+		     , ROLE_CD                                                         /*권한코드*/
+		     , (SELECT CD_NM
+		        FROM   TB_COMMON_CODE
+		        WHERE  CD_GB = 'G001'
+		        AND    CD = A.ROLE_CD
+		       )                                              AS ROLE_NM       /*권한명*/
+		     , ROLE_REF_VAL                                                    /*권한관련값*/
+		     , EMAIL                                                           /*이메일*/
+		     , CELL_PHNNO                                                      /*휴대전화번호*/
+		     , PNT_ASSIGN_AMT                                                  /*포인트부여가능금액*/
+		     , IP_ADDR                                                         /*IP주소*/
+		     , IP_CHK_YN                                                       /*IP체크여부*/
+		     , DATE_FORMAT(LOGIN_LDT,'%Y-%m-%d %H:%i:%S')     AS LOGIN_LDT     /*최종로그인일시*/
+		     , DATE_FORMAT(PASSWD_CHG_DT,'%Y-%m-%d %H:%i:%S') AS PASSWD_CHG_DT /*비밀번호변경일시*/
+		     , USE_YN                                                          /*사용여부*/
+		FROM   TB_USER A
+		WHERE  USER_NO = #{userNo}
+	</select>
+
+
+</mapper>

+ 18 - 17
style24.scm/src/main/java/com/style24/scm/biz/dao/TssBusinessDao.java

@@ -4,6 +4,7 @@ import java.util.Collection;
 
 import com.style24.core.support.annotation.ShopDs;
 import com.style24.persistence.domain.Brand;
+import com.style24.persistence.domain.BrandMd;
 import com.style24.persistence.domain.SupplyCompany;
 
 /**
@@ -58,23 +59,23 @@ public interface TssBusinessDao {
 	 */
 	Collection<Brand> getBrandList(Brand brand);
 
-//	/**
-//	 * 담당MD 목록
-//	 * @param brandMd - 담당MD 정보
-//	 * @return
-//	 * @author gagamel
-//	 * @since 2020. 11. 4
-//	 */
-//	Collection<BrandMd> getMdList(BrandMd brandMd);
-//
-//	/**
-//	 * 브랜드담당MD 목록
-//	 * @param brandCd - 브랜드코드
-//	 * @return
-//	 * @author gagamel
-//	 * @since 2020. 11. 4
-//	 */
-//	Collection<BrandMd> getBrandMdList(String brandCd);
+	/**
+	 * 담당MD 목록
+	 * @param brandMd - 담당MD 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 4
+	 */
+	Collection<BrandMd> getMdList(BrandMd brandMd);
+
+	/**
+	 * 브랜드담당MD 목록
+	 * @param brandCd - 브랜드코드
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 4
+	 */
+	Collection<BrandMd> getBrandMdList(String brandCd);
 
 //	/**
 //	 * 브랜드담당MD 삭제

+ 286 - 0
style24.scm/src/main/java/com/style24/scm/biz/dao/TssSystemDao.java

@@ -0,0 +1,286 @@
+package com.style24.scm.biz.dao;
+
+import com.style24.core.support.annotation.ShopDs;
+import com.style24.persistence.domain.User;
+
+/**
+ * 시스템 Dao
+ *
+ * @author gagamel
+ * @since 2020. 10. 7
+ */
+@ShopDs
+public interface TssSystemDao {
+
+//	/**
+//	 * 사용자 목록
+//	 * @param user - 사용자 정보
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	Collection<User> getUserList(User user);
+//
+	/**
+	 * 사용자 정보 조회
+	 * @param userNo - 사용자번호
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 10. 7
+	 */
+	User getUser(Integer userNo);
+//
+//	/**
+//	 * 사용자 삭제
+//	 * @param user - 사용자 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void deleteUser(User user);
+//
+//	/**
+//	 * 사용자ID 건수 조회
+//	 * @param userId - 사용자ID
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	int getUserIdCount(String userId);
+//
+//	/**
+//	 * 사용자 정보 저장 처리
+//	 * @param user - 사용자 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void saveUser(User user);
+//
+//	/**
+//	 * 임시비밀번호 조회
+//	 * @param length - 비밀번호 자릿수
+//	 * @return
+//	 * @since 2020. 10. 7
+//	 */
+//	String getTemporaryPassword(int length);
+//
+//	/**
+//	 * 사용자 비밀번호 수정
+//	 * @param user - 사용자 정보
+//	 * @since 2020. 10. 7
+//	 */
+//	void updateUserPassword(User user);
+//
+//	/**
+//	 * 사용자 메뉴 목록
+//	 * @param userNo - 사용자번호
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	Collection<UserMenu> getUserMenuList(Integer userNo);
+//
+//	/**
+//	 * 사용자정보변경이력 생성
+//	 * @param userHst - 사용자이력 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void createUserInfoChangeHistory(UserHst userHst);
+//
+//	/**
+//	 * 메뉴 목록
+//	 * @param menu - 메뉴정보
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	Collection<Menu> getMenuList(Menu menu);
+//
+//	/**
+//	 * 메뉴 등록/수정
+//	 * @param menu - 메뉴 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void saveMenu(Menu menu);
+//
+//	/**
+//	 * 메뉴권한 삭제
+//	 * @param menuId - 메뉴ID
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void deleteMenuRole(String menuId);
+//
+//	/**
+//	 * 메뉴권한 생성
+//	 * @param menuRole - 메뉴권한 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void createMenuRole(MenuRole menuRole);
+//
+//	/**
+//	 * 전체 사용자 메뉴 삭제
+//	 * @param menuRole - 메뉴권한 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void deleteAllUserMenu(MenuRole menuRole);
+//
+//	/**
+//	 * 전체 사용자 메뉴 생성
+//	 * @param menuRole - 메뉴권한 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void createAllUserMenu(MenuRole menuRole);
+//
+//	/**
+//	 * 사용자 전체 메뉴 삭제
+//	 * @param userNo - 사용자번호
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void deleteUserAllMenu(Integer userNo);
+//
+//	/**
+//	 * 사용자 전체 메뉴 생성
+//	 * @param user - 사용자 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void createUserAllMenu(User user);
+//
+//	/**
+//	 * 사용자 메뉴 삭제
+//	 * @param userMenu - 사용자 메뉴 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void deleteAdminUserMenu(UserMenu userMenu);
+//
+//	/**
+//	 * 사용자 메뉴 생성
+//	 * @param userMenu - 사용자 메뉴 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void createUserMenu(UserMenu userMenu);
+//
+//	/**
+//	 * 공통코드 목록
+//	 * @param commoncode - 공통코드 정보
+//	 * @return 공통코드 목록
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	Collection<CommonCode> getCommonCodeList(CommonCode commoncode);
+//
+//	/**
+//	 * 메뉴접속이력 생성
+//	 * @param menuAccessHst - 메뉴접속 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void createMenuAccessHistory(MenuAccessHst menuAccessHst);
+//
+//	/**
+//	 * 공통코드 등록/수정
+//	 * @param commoncode - 공통코드 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void saveCommonCode(CommonCode commoncode);
+//
+//	/**
+//	 * 공통코드 삭제
+//	 * @param commoncode - 공통코드 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	void deleteCommonCode(CommonCode commoncode);
+//
+//	/**
+//	 * 샘플파일 목록
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 11. 3
+//	 */
+//	Collection<SampleFile> getSampleFileList();
+//
+//	/**
+//	 * 샘플파일 등록
+//	 * @param sampleFile - 샘플파일 정보
+//	 * @author gagamel
+//	 * @since 2020. 11. 3
+//	 */
+//	void createSampleFile(SampleFile sampleFile);
+//
+//	/**
+//	 * 샘플파일 수정
+//	 * @param sampleFile - 샘플파일 정보
+//	 * @author gagamel
+//	 * @since 2020. 11. 3
+//	 */
+//	void updateSampleFile(SampleFile sampleFile);
+//
+//	/**
+//	 * 알람 목록
+//	 * @param alarm - 알람 정보
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	Collection<Alarm> getAlarmList(Alarm alarm);
+//
+//	/**
+//	 * 알람 저장
+//	 * @param alarm - 알람 정보
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	void createAlarm(Alarm alarm);
+//
+//	/**
+//	 * 알람 수정
+//	 * @param alarm - 알람 정보
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	void updateAlarm(Alarm alarm);
+//
+//	/**
+//	 * 알람 삭제
+//	 * @param alarm - 알람 정보
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	void deleteAlarm(Alarm alarm);
+//
+//	/**
+//	 * 알람수신자 목록
+//	 * @param alarmId - 알람ID
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	Collection<AlarmReceiver> getAlarmReceiverList(String alarmId);
+//
+//	/**
+//	 * 알람수신자 저장
+//	 * @param alarmReceiver - 알람수신자 정보
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	void saveAlarmReceiver(AlarmReceiver alarmReceiver);
+//
+//	/**
+//	 * 알람수신자 삭제
+//	 * @param alarmReceiver - 알람수신자 정보
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	void deleteAlarmReceiver(AlarmReceiver alarmReceiver);
+
+}

+ 22 - 21
style24.scm/src/main/java/com/style24/scm/biz/service/TssBusinessService.java

@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
 
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.persistence.domain.Brand;
+import com.style24.persistence.domain.BrandMd;
 import com.style24.persistence.domain.SupplyCompany;
 import com.style24.scm.biz.dao.TssBusinessDao;
 
@@ -91,28 +92,28 @@ public class TssBusinessService {
 		return businessDao.getBrandList(brand);
 	}
 
-//	/**
-//	 * 담당MD 목록
-//	 * @param brandMd - 담당MD 정보
-//	 * @return
-//	 * @author gagamel
-//	 * @since 2020. 11. 4
-//	 */
-//	public Collection<BrandMd> getMdList(BrandMd brandMd) {
-//		return businessDao.getMdList(brandMd);
-//	}
+	/**
+	 * 담당MD 목록
+	 * @param brandMd - 담당MD 정보
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 4
+	 */
+	public Collection<BrandMd> getMdList(BrandMd brandMd) {
+		return businessDao.getMdList(brandMd);
+	}
+
+	/**
+	 * 브랜드담당MD 목록
+	 * @param brandCd - 브랜드코드
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 11. 4
+	 */
+	public Collection<BrandMd> getBrandMdList(String brandCd) {
+		return businessDao.getBrandMdList(brandCd);
+	}
 
-//	/**
-//	 * 브랜드담당MD 목록
-//	 * @param brandCd - 브랜드코드
-//	 * @return
-//	 * @author gagamel
-//	 * @since 2020. 11. 4
-//	 */
-//	public Collection<BrandMd> getBrandMdList(String brandCd) {
-//		return businessDao.getBrandMdList(brandCd);
-//	}
-//
 //	/**
 //	 * 브랜드담당MD 목록 등록/수정 처리
 //	 * @param brandMdList - 브랜드담당MD 목록

+ 0 - 1
style24.scm/src/main/java/com/style24/scm/biz/service/TssCommonService.java

@@ -80,5 +80,4 @@ public class TssCommonService {
 		return commonDao.getErpSyncYn();
 	}
 
-
 }

+ 484 - 0
style24.scm/src/main/java/com/style24/scm/biz/service/TssSystemService.java

@@ -0,0 +1,484 @@
+package com.style24.scm.biz.service;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.style24.core.support.message.TscMessageByLocale;
+import com.style24.persistence.domain.User;
+import com.style24.scm.biz.dao.TssSystemDao;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * 시스템 Service
+ *
+ * @author gagamel
+ * @since 2020. 10. 7
+ */
+@Service
+@Slf4j
+public class TssSystemService {
+
+	@Autowired
+	private TscMessageByLocale message;
+
+	@Autowired
+	private TssSystemDao systemDao;
+
+//	/**
+//	 * 사용자 목록
+//	 * @param user - 사용자 정보
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	public Collection<User> getUserList(User user) {
+//		return systemDao.getUserList(user);
+//	}
+//
+//	/**
+//	 * 사용자 목록 삭제 처리
+//	 * @param userList - 사용자 목록
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void deleteUserList(Collection<User> userList) {
+//		for (User user : userList) {
+//			user.setUpdNo(TsaSession.getInfo().getUserNo());
+//			systemDao.deleteUser(user);
+//			this.deleteUserAccount(user); // 계정말소
+//		}
+//	}
+//
+	/**
+	 * 사용자 정보 조회
+	 * @param userNo - 사용자번호
+	 * @return
+	 * @author gagamel
+	 * @since 2020. 10. 7
+	 */
+	public User getUser(Integer userNo) {
+		return systemDao.getUser(userNo);
+	}
+//
+//	/**
+//	 * 사용자ID 건수 조회
+//	 * @param userId - 사용자ID
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	public int getUserIdCount(String userId) {
+//		return systemDao.getUserIdCount(userId);
+//	}
+//
+//	/**
+//	 * 사용자 정보 저장 처리
+//	 * @param user - 사용자 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void saveUser(User user) {
+//		user.setRegNo(TsaSession.getInfo().getUserNo());
+//		user.setUpdNo(TsaSession.getInfo().getUserNo());
+//
+//		// 사용자 저장 처리
+//		systemDao.saveUser(user);
+//
+//		// 등록된 사용자번호 값 가져오기
+//		Integer userNo = user.getUserNo();
+//		log.info("userNo: {}", userNo);
+//		user.setUserNo(userNo);
+//
+//		if (user.getMode().equals("N")) {
+//			this.createUserAccount(user); // 계정생성
+//		} else if (user.getMode().equals("U")) {
+//			if (user.getUseYn().equals("N")) {
+//				this.deleteUserAccount(user); // 계정말소
+//			} else {
+//				this.restoreUserAccount(user); // 계정복원
+//			}
+//		}
+//
+//		// 권한이 변경되었으면
+//		if (user.getRoleChangeYn().equals("Y")) {
+//			// 사용자 전체메뉴 삭제
+//			systemDao.deleteUserAllMenu(user.getUserNo());
+//
+//			// 사용자 전체메뉴 생성
+//			systemDao.createUserAllMenu(user);
+//
+//			if (user.getMode().equals("U")) {
+//				this.createUserRoleChange(user); // 권한변경
+//			}
+//		}
+//	}
+//
+//	/**
+//	 * 사용자정보변경이력 생성 - 계정생성
+//	 * @param user - 사용자 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 8
+//	 */
+//	private void createUserAccount(User user) {
+//		UserHst userHst = new UserHst();
+//		userHst.setUserNo(user.getUserNo());
+//		userHst.setChgGb("G049_10"); // 계정생성
+//		userHst.setRegNo(TsaSession.getInfo().getUserNo());
+//		systemDao.createUserInfoChangeHistory(userHst);
+//	}
+//
+//	/**
+//	 * 사용자정보변경이력 생성 - 계정말소
+//	 * @param user - 사용자 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 8
+//	 */
+//	private void deleteUserAccount(User user) {
+//		UserHst userHst = new UserHst();
+//		userHst.setUserNo(user.getUserNo());
+//		userHst.setChgGb("G049_11"); // 계정말소
+//		userHst.setRegNo(TsaSession.getInfo().getUserNo());
+//		systemDao.createUserInfoChangeHistory(userHst);
+//	}
+//
+//	/**
+//	 * 사용자정보변경이력 생성 - 계정복원
+//	 * @param user - 사용자 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 8
+//	 */
+//	private void restoreUserAccount(User user) {
+//		UserHst userHst = new UserHst();
+//		userHst.setUserNo(user.getUserNo());
+//		userHst.setChgGb("G049_12"); // 계정복원
+//		userHst.setRegNo(TsaSession.getInfo().getUserNo());
+//		systemDao.createUserInfoChangeHistory(userHst);
+//	}
+//
+//	/**
+//	 * 사용자정보변경이력 생성 - 권한변경
+//	 * @param user - 사용자 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 8
+//	 */
+//	private void createUserRoleChange(User user) {
+//		UserHst userHst = new UserHst();
+//		userHst.setUserNo(user.getUserNo());
+//		userHst.setChgGb("G049_20"); // 권한변경
+//		userHst.setOrgRoleCd(TsaSession.getInfo().getRoleCd());
+//		userHst.setRoleCd(user.getRoleCd());
+//		userHst.setRegNo(TsaSession.getInfo().getUserNo());
+//		systemDao.createUserInfoChangeHistory(userHst);
+//	}
+//
+//	/**
+//	 * 임시비밀번호 조회
+//	 * @param length - 비밀번호 자릿수
+//	 * @return 임시비밀번호
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	public String getTemporaryPassword(int length) {
+//		return systemDao.getTemporaryPassword(length);
+//	}
+//
+//	/**
+//	 * 사용자 비밀번호 수정
+//	 * @param user - 사용자 정보
+//	 * @since 2020. 10. 7
+//	 */
+//	public void updateUserPassword(User user) {
+//		systemDao.updateUserPassword(user);
+//
+//		// 사용자정보변경이력 생성 - 비밀번호변경
+//		UserHst userHst = new UserHst();
+//		userHst.setUserNo(user.getUserNo());
+//		userHst.setChgGb("G049_30"); // 비밀번호변경
+//		userHst.setRegNo(TsaSession.getInfo().getUserNo());
+//		systemDao.createUserInfoChangeHistory(userHst);
+//	}
+//
+//	/**
+//	 * 사용자 메뉴 목록
+//	 * @param userNo - 사용자번호
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	public Collection<UserMenu> getUserMenuList(Integer userNo) {
+//		return systemDao.getUserMenuList(userNo);
+//	}
+//
+//	/**
+//	 * 사용자 메뉴 목록 저장 처리
+//	 * @param userMenuList - 사용자 메뉴 목록
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void saveUserMenuList(Collection<UserMenu> userMenuList) {
+//		if (userMenuList == null || userMenuList.isEmpty())
+//			throw new IllegalStateException(message.getMessage("FAIL_1001"));
+//
+//		int cnt = 0;
+//		log.info("saveUserMenuList userMenuList={}", userMenuList);
+//
+//		for (UserMenu adminMenu : userMenuList) {
+//			if (cnt++ == 0) {
+//				// 사용자 전체메뉴 삭제
+//				systemDao.deleteUserAllMenu(adminMenu.getUserNo());
+//			}
+//
+//			adminMenu.setRegNo(TsaSession.getInfo().getUserNo());
+//			adminMenu.setUpdNo(TsaSession.getInfo().getUserNo());
+//			adminMenu.setUseRole("RCUD");
+//
+//			// 사용자 메뉴 생성
+//			systemDao.createUserMenu(adminMenu);
+//		}
+//	}
+//
+//	/**
+//	 * 메뉴 목록
+//	 * @param pmenuId - 상위메뉴ID
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	public Collection<Menu> getMenuList(String pmenuId) {
+//		Menu menu = new Menu();
+//		menu.setPmenuId(pmenuId);
+//		return systemDao.getMenuList(menu);
+//	}
+//
+//	/**
+//	 * 메뉴 목록 저장 처리
+//	 * @param menuList - 메뉴 목록
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void saveMenuList(Collection<Menu> menuList) {
+//		if (menuList == null || menuList.isEmpty())
+//			throw new IllegalStateException(message.getMessage("FAIL_1001"));
+//
+//		for (Menu menu : menuList) {
+//			menu.setRegNo(TsaSession.getInfo().getUserNo());
+//			menu.setUpdNo(TsaSession.getInfo().getUserNo());
+//			systemDao.saveMenu(menu);
+//		}
+//	}
+//
+//	/**
+//	 * 메뉴 등록/수정 및 메뉴권한 생성
+//	 * @param menu - 메뉴 정보
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	@Transactional("shopTxnManager")
+////	@CacheEvict(value = "menu", allEntries = true)
+//	public void saveMenu(Menu menu) {
+//		menu.setRegNo(TsaSession.getInfo().getUserNo());
+//		menu.setUpdNo(TsaSession.getInfo().getUserNo());
+//
+//		// 메뉴 등록/수정
+//		systemDao.saveMenu(menu);
+//
+//		if (StringUtils.isNotBlank(menu.getRoleCds())) {
+//			// 메뉴권한 삭제
+//			systemDao.deleteMenuRole(menu.getMenuId());
+//
+//			String[] roleCds = menu.getRoleCds().split(",");
+//
+//			for (String roleCd : roleCds) {
+//				MenuRole menuRole = new MenuRole();
+//				menuRole.setRoleCd(roleCd);
+//				menuRole.setMenuId(menu.getMenuId());
+//				menuRole.setRegNo(TsaSession.getInfo().getUserNo());
+//				menuRole.setUpdNo(TsaSession.getInfo().getUserNo());
+//
+//				// 메뉴권한 생성
+//				systemDao.createMenuRole(menuRole);
+//
+//				// 전체 어드민사용자 메뉴 생성
+//				systemDao.deleteAllUserMenu(menuRole);
+//
+//				// 전체 어드민사용자 메뉴 생성
+//				systemDao.createAllUserMenu(menuRole);
+//			}
+//		}
+//	}
+//
+//	/**
+//	 * 공통코드 목록
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	public Collection<CommonCode> getCommonCodeList() {
+//		return this.getCommonCodeList(new CommonCode());
+//	}
+//
+//	/**
+//	 * 공통코드 목록
+//	 * @param commoncode - 공통코드 정보
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	public Collection<CommonCode> getCommonCodeList(CommonCode commoncode) {
+//		return systemDao.getCommonCodeList(commoncode);
+//	}
+//
+//	/**
+//	 * 공통코드 목록 저장 처리
+//	 * @param dataList - 공통코드 목록
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void saveCommonCodeList(Collection<CommonCode> dataList) {
+//		if (dataList == null || dataList.isEmpty())
+//			throw new IllegalStateException(message.getMessage("FAIL_1001"));
+//
+//		for (CommonCode commoncode : dataList) {
+//			commoncode.setRegNo(TsaSession.getInfo().getUserNo());
+//			commoncode.setUpdNo(TsaSession.getInfo().getUserNo());
+//			commoncode.setCdNm(commoncode.getCdNm().replace("&gt;", ">"));
+//			systemDao.saveCommonCode(commoncode);
+//		}
+//	}
+//
+//	/**
+//	 * 공통코드 저장 처리
+//	 * @param commoncode - 공통코드 정보
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void saveCommonCode(CommonCode commoncode) {
+//		commoncode.setRegNo(TsaSession.getInfo().getUserNo());
+//		commoncode.setUpdNo(TsaSession.getInfo().getUserNo());
+//		commoncode.setCdNm(commoncode.getCdNm().replace("&gt;", ">"));
+//		systemDao.saveCommonCode(commoncode);
+//	}
+//
+//	/**
+//	 * 공통코드 삭제처리
+//	 * @param commoncode - 공통코드 정보
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 10. 7
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void deleteCommonCode(CommonCode commoncode) {
+//		systemDao.deleteCommonCode(commoncode);
+//	}
+//
+//	/**
+//	 * 샘플파일 목록
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 11. 3
+//	 */
+//	public Collection<SampleFile> getSampleFileList() {
+//		return systemDao.getSampleFileList();
+//	}
+//
+//	/**
+//	 * 샘플파일 등록/수정
+//	 * @param sampleFile - 샘플파일 정보
+//	 * @author gagamel
+//	 * @since 2020. 11. 3
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void saveSampleFile(SampleFile sampleFile) {
+//		if (sampleFile.getMode().equals("N")) {
+//			systemDao.createSampleFile(sampleFile);
+//		} else {
+//			systemDao.updateSampleFile(sampleFile);
+//		}
+//	}
+//
+//	/**
+//	 * 알람 목록
+//	 * @param alarm - 알람 정보
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	public Collection<Alarm> getAlarmList(Alarm alarm) {
+//		return systemDao.getAlarmList(alarm);
+//	}
+//
+//	/**
+//	 * 알람 저장
+//	 * @param alarm - 알람 정보
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void saveAlarm(Alarm alarm) {
+//		if (alarm.getMode().equals("N")) {
+//			systemDao.createAlarm(alarm);
+//		} else {
+//			systemDao.updateAlarm(alarm);
+//		}
+//	}
+//
+//	/**
+//	 * 알람 삭제
+//	 * @param alarm - 알람 정보
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void deleteAlarm(Alarm alarm) {
+//		systemDao.deleteAlarm(alarm);
+//	}
+//
+//	/**
+//	 * 알람수신자 목록
+//	 * @param alarmId - 알람ID
+//	 * @return
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	public Collection<AlarmReceiver> getAlarmReceiverList(String alarmId) {
+//		return systemDao.getAlarmReceiverList(alarmId);
+//	}
+//
+//	/**
+//	 * 알람수신자 목록 저장
+//	 * @param alarmReceiverList - 알람수신자 목록
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void saveAlarmReceiverList(Collection<AlarmReceiver> alarmReceiverList) {
+//		for (AlarmReceiver alarmReceiver : alarmReceiverList) {
+//			alarmReceiver.setRegNo(TsaSession.getInfo().getUserNo());
+//			alarmReceiver.setUpdNo(TsaSession.getInfo().getUserNo());
+//			systemDao.saveAlarmReceiver(alarmReceiver);
+//		}
+//	}
+//
+//	/**
+//	 * 알람수신자 목록 삭제
+//	 * @param alarmReceiverList - 알람수신자 목록
+//	 * @author gagamel
+//	 * @since 2020. 11. 13
+//	 */
+//	@Transactional("shopTxnManager")
+//	public void deleteAlarmReceiverList(Collection<AlarmReceiver> alarmReceiverList) {
+//		for (AlarmReceiver alarmReceiver : alarmReceiverList) {
+//			systemDao.deleteAlarmReceiver(alarmReceiver);
+//		}
+//	}
+
+}

+ 67 - 0
style24.scm/src/main/java/com/style24/scm/biz/web/TssGoodsController.java

@@ -18,8 +18,11 @@ import org.springframework.web.servlet.ModelAndView;
 import com.style24.core.support.message.TscMessageByLocale;
 import com.style24.persistence.TssPageRequest;
 import com.style24.persistence.domain.GoodsSearch;
+import com.style24.persistence.domain.User;
+import com.style24.scm.biz.service.TssCommonService;
 import com.style24.scm.biz.service.TssGoodsService;
 import com.style24.scm.biz.service.TssRendererService;
+import com.style24.scm.biz.service.TssSystemService;
 import com.style24.scm.support.controller.TssBaseController;
 import com.style24.scm.support.security.session.TssSession;
 
@@ -52,6 +55,12 @@ public class TssGoodsController extends TssBaseController {
 	@Autowired
 	private TssRendererService rendererService;
 
+	@Autowired
+	private TssCommonService commonService;
+
+	@Autowired
+	private TssSystemService systemService;
+
 	/**
 	 * 상품목록 화면
 	 *
@@ -175,4 +184,62 @@ public class TssGoodsController extends TssBaseController {
 
 		return GagaFileUtil.writeFile(request, excelFilenameWithPath);
 	}
+
+	/**
+	 * 상품 대량 등록 화면
+	 *
+	 * @return
+	 * @author eskim
+	 * @since 2020. 10. 16
+	 */
+	@GetMapping("/mass/register/form")
+	public ModelAndView massRegisterForm() {
+		ModelAndView mav = new ModelAndView();
+
+		// 상품상태
+		mav.addObject("goodsStatList", rendererService.getAvailCommonCodeList("G008"));
+		// 사용여부
+		mav.addObject("useYnList", rendererService.getAvailCommonCodeList("G002"));
+		// ERP 연동여부
+		mav.addObject("erpSyncYn", commonService.getErpSyncYn());
+		// 정보고시 목록
+		mav.addObject("niClsfCdList", rendererService.getAvailCommonCodeList("G004"));
+		// 사용자 업체
+		User loginInfo = systemService.getUser(TssSession.getInfo().getUserNo());
+		String supplyCompCd = "NONE";
+		if (loginInfo != null) {
+			supplyCompCd = loginInfo.getSupplyCompCd();
+		}
+		mav.addObject("supplyCompCd", supplyCompCd);
+		mav.setViewName("goods/GoodsMassRegisterForm");
+
+		return mav;
+	}
+
+	/**
+	 * 입점 가격 관리 화면
+	 *
+	 * @return
+	 * @author eskim
+	 * @since 2020. 10. 16
+	 */
+	@GetMapping("/supply/price/form")
+	public ModelAndView priceForm() {
+		ModelAndView mav = new ModelAndView();
+		// 공급업체
+		String supplyCompCd = "";
+		if ("G001_B000".equals(TssSession.getInfo().getRoleCd())) {
+			supplyCompCd = TssSession.getInfo().getSupplyCompCd();
+		}
+		mav.addObject("supplyCompList", rendererService.getSupplyCompanyList(supplyCompCd, "N"));
+
+		// 상품상태
+		String[] exceptCds = {"G008_00"};
+		mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", exceptCds));
+		// 정상이월
+		mav.addObject("formalGbList", rendererService.getAvailCommonCodeList("G009"));
+		mav.setViewName("goods/GoodsSupplyPriceForm");
+
+		return mav;
+	}
 }

+ 1979 - 0
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsDetailForm.html

@@ -0,0 +1,1979 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : GoodsDetailForm.html
+ * @desc    : 상품 상세 팝업
+ *============================================================================
+ * SISUNChDataYn
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2020.10.23   eskim       최초 작성
+ *******************************************************************************
+ -->
+	<div class="modalPopup" data-width="1500"> <!-- data-width="1500" data-height="870" -->
+		<div class="panelStyle">
+			<div class="panelTitle">
+				<h2>상품상세</h2>
+				<button type="button" class="close" onclick="fnGoodsDetailClose()"><i class="fa fa-times"></i></button>
+			</div>
+			<div class="panelContent">
+			<form id="goodsDetailForm" name="goodsDetailForm" action="#" th:method="post">
+				<input type="hidden" id="mode" name="mode" th:value="${params.mode}"/>
+				<input type="hidden" id="goodsCd" name="goodsCd" th:value="${params.goodsCd}"/>
+				<input type="hidden" id="niClsfCd" name="niClsfCd"/>
+				<input type="hidden" id="selfGoodsYn" name="selfGoodsYn"/>
+				<input type="hidden" id="notiList" name="notiList" />
+				<input type="hidden" id="chDataYn" name="chDataYn" />
+				<input type="hidden" id="chStockDataYn" name="chStockDataYn" />
+				<input type="hidden" id="goodsImageYn" name="goodsImageYn" />
+				<input type="hidden" id="niClsfNm" name="niClsfNm" />
+				<input type="hidden" id="uploadGoodsUrl" name="uploadGoodsUrl" th:value="${@environment.getProperty('upload.goods.view')}"/>
+				<input type="hidden" id="mainColorCd" name="mainColorCd" />
+				<input type="hidden" id="goodsType" name="goodsType" />
+				<input type="hidden" id="goodsComposeList" name="goodsComposeList" />
+				<table class="frmStyle">
+					<colgroup>
+						<col width="11%"/>
+						<col/>
+						<col width="11%"/>
+						<col width="14%"/>
+						<col width="11%"/>
+						<col width="14%"/>
+						<col width="11%"/>
+						<col width="14%"/>
+					</colgroup>
+					<tr>
+						<th>브랜드명<em class="required" title="필수"></em></th>
+						<td colspan="3">
+							<select name="selSupplyCompCd" id="selSupplyCompCd" disabled="disabled" class="w40p">
+								<option value="">[선택]</option>
+								<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+							<select name="selBrandCd" id="selBrandCd" disabled="disabled"  class="w40p">
+								<option value="">[선택]</option>
+							</select>
+	
+							<input type="hidden" name="supplyCompCd" id="supplyCompCd" />
+							<input type="hidden" name="brandGrpNm" id="brandGrpNm" />
+							<input type="hidden" name="brandCd" id="brandCd" />
+						</td>
+						<th>상품코드<em class="required" title="필수"></em></th>
+						<td><div id="goodsCdTxt"></div></td>
+						<th>원코드</th>
+						<td><span id="supplyGoodsCdTxt"></span></td>
+					</tr>
+				</table>
+				<!-- TABS SPACE -->
+				<div class="tabs">
+					<!-- TABS NAVI -->
+					<div class="tabsNav">
+						<ul>
+							<li class="on"><a href="#goodstab1">기본정보</a></li>
+							<li><a href="#goodstab2">옵션/재고정보</a></li>
+							<li><a href="#goodstab3">상품상세정보</a></li>
+							<li id="goodsNotiTab"><a href="#goodstab4">고시정보</a></li>
+							<!-- <li id="goodsColorTab"><a href="#goodstab5">대표색상</a></li> -->
+							<li id="GoodsComposeTab" style="display:none;"><a href="#goodstab6">구성상품</a></li>
+							<li><a href="#goodstab7">변경이력</a></li>
+						</ul>
+					</div>
+					<!-- //TABS NAVI -->
+					<!-- TABS CONTENTS -->
+					<ul class="tabsCont" th:with="uxImgUrl=${@environment.getProperty('domain.uximage')}">
+						<!-- TAB1 : 기본정보 -->
+						<li class="tab on" id="goodstab1">
+							<!-- TAB1 CONTENTS AREA -->
+							<div class="panelStyle">
+								<table class="frmStyle">
+									<colgroup>
+										<col width="10%"/>
+										<col width="15%"/>
+										<col width="15%"/>
+										<col width="15%"/>
+										<col width="15%"/>
+										<col width="15%"/>
+										<col/>
+									</colgroup>
+									<tbody>
+									<tr>
+										<td rowspan="4" style="text-align:center" th:with="uploadGoodsUrl=${@environment.getProperty('upload.goods.view')}">
+										<img id="goodsImgUrl" src="" width="100px"/>
+										<input type="hidden" name="imgPath1" id="imgPath1" />
+										</td>
+										<th>상품타이틀</th>
+										<td colspan="5">
+											<input type="text" class="w80p" id="goodsTnm" name="goodsTnm" maxlength=""></input>
+											<span class="byteChk"><em class="cBlue" id="goodsTnmLen">0</em>/100 bytes</span>
+											<input type="hidden" id="goodsTnmOrg" name="goodsTnmOrg"/>
+										</td>
+									</tr>
+									<tr>
+										<th>상품명<em class="required" title="필수"></em></th>
+										<td colspan="5">
+											<input type="text" class="w80p" id="goodsNm" name="goodsNm"></input>
+											<span class="byteChk"><em class="cBlue" id="goodsNmLen">0</em>/200 bytes</span>
+											<input type="hidden" id="goodsNmOrg" name="goodsNmOrg"/>
+										</td>
+									</tr>
+									<tr>
+										<th>사용자검색어</th>
+										<td colspan="5">
+											<input type="text" class="w60p" id="goodsSnm1" name="goodsSnm1"></input>
+											<span class="byteChk"><em class="cBlue" id="goodsSnm1Len">0</em>/200 bytes</span><font class="cBlue padL10"><b>* 여러개설정할경우 ; 구분자 사용 / 공백은 자동삭제처리</b></font>
+											<input type="hidden" id="goodsSnm1Org" name="goodsSnm1Org"/>
+										</td>
+									</tr>
+									<tr>
+										<th>검색어</th>
+										<td colspan="5">
+											<textarea class="textareaR2 w100p" id="goodsSnmTxt" name="goodsSnmTxt" disabled="disabled"></textarea>
+											<!-- <input type="text" class="w100p" id="goodsSnmTxt" name="goodsSnmTxt" disabled="disabled"></input> -->
+											<input type="hidden" id="goodsSnm" name="goodsSnm"></input>
+										</td>
+									</tr>
+									<tr>
+										<td class="aC cRed" style="font-weight:bold;"><span id="goodsTypeNm"></span></td> <!-- 상품타입노출 -->
+										<th>정상/이월 구분<em class="required" title="필수"></em></th>
+										<td>
+											<label class="rdoBtn" th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" ><input type="radio" id="formalGb" name="formalGb" th:value="${oneData.cd}" th:text="${oneData.cdNm}" /></label>
+											<input type="hidden" id="formalGbOrg" name="formalGbOrg"/>
+										</td>
+										<th>상품상태<em class="required" title="필수"></em></th>
+										<td>
+											<select  name="goodsStat" id="goodsStat">
+											<option value="">[선택]</option>
+											<option th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+											</select>
+											<input type="hidden" id="goodsStatOrg" name="goodsStatOrg"/>
+										</td>
+										<th>자사몰 노출여부<em class="required" title="필수"></em></th>
+										<td>
+											<label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnY" value="Y" />Y</label>
+											<label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnN" value="N"/>N</label>
+											<input type="hidden" id="selfMallYnOrg" name="selfMallYnOrg"/>
+										</td>
+									</tr>
+									<tr>
+										<td rowspan="11">&nbsp;</td>
+										<th>시즌<em class="required" title="필수"></em></th>
+										<td >
+											<select  name="seasonCd" id="seasonCd">
+												<option value="">[선택]</option>
+												<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+											</select>
+											<input type="hidden" id="seasonCdOrg" name="seasonCdOrg"/>
+										</td>
+										<th>성별<em class="required" title="필수"></em></th>
+										<td>
+											<select  name="sexGb" id="sexGb">
+												<option value="">[선택]</option>
+												<option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+											</select>
+											<input type="hidden" id="sexGbOrg" name="sexGbOrg"/>
+										</td>
+										<th>스타일년도</th>
+										<td><span id="styleYearTxt"></span></td>
+									</tr>
+									<tr id="erplinkarea">
+										<th>원산지</th>
+										<td><span id="makeNmTxt"></span></td>
+										<th>상품구분<em class="required" title="필수"></em></th>
+										<td>
+											<select  name="goodsGb" id="goodsGb">
+												<option value="">[선택]</option>
+												<option th:if="${goodsGbList}" th:each="oneData, status : ${goodsGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+											</select>
+											<input type="hidden" id="goodsGbOrg" name="goodsGbOrg"/>
+										</td>
+										<th>유통구분<em class="required" title="필수"></em></th>
+										<td><select  name="distributionGb" id="distributionGb">
+												<option value="">[선택]</option>
+												<option th:if="${distributionGbList}" th:each="oneData, status : ${distributionGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+											</select>
+											<input type="hidden" id="distributionGbOrg" name="distributionGbOrg"/>
+										</td>
+									</tr>
+									<tr id="erplinkarea">
+										<th>상품연령대</th>
+										<td>
+											<select  name="ageGrpCd" id="ageGrpCd">
+												<option value="">[선택]</option>
+												<option th:if="${ageGrpCdList}" th:each="oneData, status : ${ageGrpCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+											</select>
+											<input type="hidden" id="ageGrpCdOrg" name="ageGrpCdOrg"/>
+										</td>
+										<th>선물 주문가능여부<em class="required" title="필수"></em></th>
+										<td>
+											<label class="rdoBtn"><input type="radio" name="giftPackYn" id="giftPackYnY" value="Y" />Y</label>
+											<label class="rdoBtn"><input type="radio" name="giftPackYn" id="giftPackYnN" value="N"/>N</label>
+											<input type="hidden" id="giftPackYnOrg" name="giftPackYnOrg"/>
+										</td>
+										<th>가격변경일</th>
+										<td><span id="priceUpdDtTxt"></span></td>
+									</tr>
+									<tr>
+										<th>정상가</th>
+										<td class="aR"><span id="listPriceTxt"></span> 원
+											<input type="hidden" id="listPrice" name="listPrice"/>
+										</td>
+										<th>판매가<em class="required" title="필수"></em></th>
+										<td><input type="text" class="w80p aR" id="currPrice" name="currPrice" maxlength="10" data-valid-type="numeric"/> 원
+											<input type="hidden" id="currPriceOrg" name="currPriceOrg"/>
+										</td>
+										<th>할인율</th>
+										<td class="aR" ><span id="dcRateTxt"></span> %  <input type="hidden" id="dcRate" name="dcRate"/></td>
+									</tr>
+									<tr id="selfGoodsNSellFeeRate">
+										<th>최초승인일</th>
+										<td><span id="frstCfrmDtTxt"></span></td>
+										<th>판매수수료율<em class="required" title="필수"></em></th>
+										<td><input type="text" class="w80p aR" id="sellFeeRate" name="sellFeeRate" maxlength="10" data-valid-type="numeric"/> %
+											<input type="hidden" id="sellFeeRateOrg" name="sellFeeRateOrg"/>
+										</td>
+										<th>반품여부<em class="required" title="필수"></em></th>
+										<td>
+											<label class="rdoBtn"><input type="radio" name="returnableYn" id="returnableYnY" value="Y" />Y</label>
+											<label class="rdoBtn"><input type="radio" name="returnableYn" id="returnableYnN" value="N"/>N</label>
+											<input type="hidden" id="returnableYnOrg" name="returnableYnOrg"/>
+										</td>
+									</tr>
+									<tr>
+										<th>품목코드<em class="required" title="필수"></em></th>
+										<td colspan="3">
+											<select  name="itemkindCd" id="itemkindCd" th:disabled="${sessionInfo.roleCd != 'G001_0000' AND sessionInfo.roleCd != 'G001_A000' AND sessionInfo.roleCd != 'G001_A101' AND sessionInfo.roleCd != 'G001_A100' AND sessionInfo.roleCd != 'G001_A001'}">
+												<option th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+											</select>
+											<input type="hidden" id="orgItemkindCd" name="orgItemkindCd"/>
+											<th:block th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001' }">
+											<button type="button" class="btn btn-success btn-lg" id="btnGoodsItemkindChange">품목변경</button>
+											</th:block>
+										</td>
+										<th>기본배송비</th>
+										<td>
+											<input type="text" class="w100 aR" id="delvFee" name="delvFee"  disabled="disabled"/> 원
+										</td>
+									</tr>
+									<tr>
+										<th>PC포인트<em class="required" title="필수"></em></th>
+										<td>
+											<input type="text" class="w50 aR" id="pntPrate" name="pntPrate" data-valid-type="numeric" maxlength="3"/> % /&nbsp;
+											<input type="hidden" id="pntPrateOrg" name="pntPrateOrg"/>
+											<label class="rdoBtn"><input type="radio" name="prePpntUsableYn" id="prePpntUsableYnY" value="Y"/>Y</label>
+											<label class="rdoBtn"><input type="radio" name="prePpntUsableYn" id="prePpntUsableYnN" value="N"/>N</label>
+											<input type="hidden" id="prePpntUsableYnOrg" name="prePpntUsableYnOrg"/>
+										</td>
+										<th>모바일포인트<em class="required" title="필수"></em></th>
+										<td>
+											<input type="text" class="w50 aR" id="pntMrate" name="pntMrate" data-valid-type="numeric" maxlength="3"/> % /&nbsp;
+											<input type="hidden" id="pntMrateOrg" name="pntMrateOrg"/>
+											<label class="rdoBtn"><input type="radio" name="preMpntUsableYn" id="preMpntUsableYnY" value="Y"/>Y</label>
+											<label class="rdoBtn"><input type="radio" name="preMpntUsableYn" id="preMpntUsableYnN" value="N"/>N</label>
+											<input type="hidden" id="preMpntUsableYnOrg" name="preMpntUsableYnOrg"/>
+										</td>
+										<th>무료배송비기준<em class="required" title="필수"></em></th>
+										<td>
+											<input type="text" class="w100 aR" id="minOrdAmt" name="minOrdAmt" data-valid-type="numeric" maxlength="10"/> 원
+											<input type="hidden" id="minOrdAmtOrg" name="minOrdAmtOrg"/>
+										</td>
+									</tr>
+									<tr>
+										<th>최소주문수량<em class="required" title="필수"></em></th>
+										<td>
+											<input type="text" class="w100 aR" id="minOrdQty" name="minOrdQty" data-valid-type="integer" maxlength="5"/>
+											<input type="hidden" id="minOrdQtyOrg" name="minOrdQtyOrg"/>
+										</td>
+										<th>최대주문수량<em class="required" title="필수"></em></th>
+										<td>
+											<input type="text" class="w100 aR" id="maxOrdQty" name="maxOrdQty" data-valid-type="integer" maxlength="5"/>
+											<input type="hidden" id="maxOrdQtyOrg" name="maxOrdQtyOrg"/>
+										</td>
+										<th>ID당1일최대구매수량<em class="required" title="필수"></em></th>
+										<td>
+											<input type="text" class="w100 aR" id="dayMaxOrdQty" name="dayMaxOrdQty" data-valid-type="integer" maxlength="5"/>
+											<input type="hidden" id="dayMaxOrdQtyOrg" name="dayMaxOrdQtyOrg"/>
+										</td>
+									</tr>
+									</tbody>
+								</table>
+							</div>
+							<!-- //TAB1  CONTENTS AREA -->
+						</li>
+						<!-- //TAB1 -->
+						<!-- TAB2 : 옵셥/재고 -->
+						<li class="tab" id="goodstab2">
+							<!-- TAB2 CONTENTS AREA -->
+							<div class="panelStyle">
+								<!-- <ul class="notice cBlue">
+									<li><strong>상품 이미지 사이즈</strong> : <em><strong>600 × 600</strong> px</em></li>
+								</ul> -->
+								<div id="sizeStockArea"></div>
+							</div>
+							<!-- //TAB2 CONTENTS AREA -->
+						</li>
+						<!-- //TAB2 : 이미지/옵셥/재고 -->
+						<!-- TAB3 : 상품상세 -->
+						<li class="tab" id="goodstab3">
+							<!-- TAB3 CONTENTS AREA -->
+							<div class="panelStyle">
+								<!-- TABS SPACE -->
+								<div class="tabsJr">
+									<!-- TABS CONTENT -->
+									<ul class="tabsJrCont">
+										<!-- TAB -->
+										<li class="tabJr on" id="goodstab11">
+											<!-- TAB11 CONTENTS AREA -->
+											<table class="frmStyle">
+											<colgroup>
+												<col width="12%"/>
+												<col/>
+											</colgroup>
+											<tr>
+												<th>상세설명</th>
+												<td><label class="chkBox"><input type="checkbox" name="chkDescKeep" checked="checked" value="Y">정보유지<span></span></label>
+												</td>
+											</tr>
+											<tr>
+												<th>상위(PC)</th>
+												<td><div class="tabJrContArea">
+													<textarea class="textareaR4 summernote" name="goodsPcTopDesc" id="goodsPcTopDesc"></textarea>
+													</div>
+												</td>
+											</tr>
+											<tr>
+												<th>상위(MOBILE)</th>
+												<td><div class="tabJrContArea">
+													<textarea class="textareaR4 summernote" name="goodsMobileTopDesc" id="goodsMobileTopDesc"></textarea>
+													</div>
+												</td>
+											</tr>
+											<tr>
+												<th>하위(PC)</th>
+												<td><div class="tabJrContArea">
+													<textarea class="textareaR4 summernote" name="goodsPcDownDesc" id="goodsPcDownDesc"></textarea>
+													</div>
+												</td>
+											</tr>
+											<tr>
+												<th>하위(MOBILE)</th>
+												<td><div class="tabJrContArea">
+													<textarea class="textareaR4 summernote" name="goodsMobileDownDesc" id="goodsMobileDownDesc"></textarea>
+													</div>
+												</td>
+											</tr>
+											</table>
+										</li>
+										<!-- //TAB -->
+									</ul>
+									<!-- //TAB CONTENT -->
+								</div>
+								<!-- //TABS SPACE -->
+							</div>
+							<!-- //TAB3 CONTENTS AREA -->
+						</li>
+						<!-- //TAB3 : 상품상세 -->
+						<!-- TAB4 : 고시정보 -->
+						<li class="tab" id="goodstab4">
+							<!-- TAB5 CONTENTS AREA -->
+							<div class="panelStyle">
+								<!-- TABS SPACE -->
+								<table class="frmStyle">
+									<colgroup>
+										<col style="width:10%"/>
+										<col/>
+									</colgroup>
+									<tr>
+										<th>Details (상품상세정보 고시)<em class="required" title="필수"></em></th>
+										<td>
+											<select id="selNiClsfCd" name="selNiClsfCd"  class="w40p">
+												<option value="">[선택]</option>
+												<option th:if="${niClsfCdList}" th:each="oneData, status : ${niClsfCdList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
+											</select>
+											<button type="button" class="btn btn-dark btn-lg" id="btnNotinfo">선택</button>
+											<span class="padL10" id='itemkindNoti'></span>
+										</td>
+									</tr>
+								</table>
+								<hr/>
+								<div id="notiArea"></div>
+								<!-- //TABS SPACE -->
+							</div>
+							<!-- //TAB4 CONTENTS AREA -->
+						</li>
+						<!-- //TAB4 : 고시정보 -->
+
+<!-- 					<li class="tab" id="goodstab5">
+						<div class="panelStyle">
+							<div id="gridGoodsNumList" style="height: 480px;" class="ag-theme-balham lh60"></div>
+						</div>
+					</li> -->
+
+						<!-- TAB6 : 구성상품 -->
+						<li class="tab" id="goodstab6">
+							<!-- TAB6 CONTENTS AREA -->
+							<div class="panelStyle">
+								<!-- 내용 삽입 -->
+								<ul class="panelBar"  id="GoodsComposeBtnArea">
+									<li class="right">
+										<button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF003');">양식다운로드</button>
+										<button type="button" class="btn btn-success btn-lg" id="btnGoodsDealSearchExcel">엑셀조회</button>
+										<button type="button" class="btn btn-base btn-lg" onclick="fnOpenGoodsDetailPopup()">상품조회</button>
+									</li>
+								</ul>
+								<div id="gridGoodsComposeList" style="height: 500px;" class="ag-theme-balham lh60"></div>
+								<!-- 내용 삽입 -->
+							</div>
+							<!-- //TAB6 CONTENTS AREA -->
+						</li>
+						<!-- //TAB7 : 추가정보 -->
+						<!-- TAB5 : 이력정보 -->
+						<li class="tab" id="goodstab7">
+							<!-- TAB8 CONTENTS AREA -->
+							<div class="panelStyle">
+								<!-- 내용 삽입 -->
+								<div id="gridGoodsHstoryList" style="height: 500px;" class="ag-theme-balham"></div>
+								<!-- 내용 삽입 -->
+							</div>
+							<!-- //TAB5 CONTENTS AREA -->
+						</li>
+						<!-- //TAB5 : 추가정보 -->
+					</ul>
+					<!-- //TABS CONTENTS -->
+					<!-- TABS BUTTON AREA -->
+					<ul class="panelBar marT10">
+						<li class="left">
+							<button type="button" class="btn btnLeft btn-base btn-lg" id="btnGoodsDetailPreview">미리보기</button>
+							<!-- <button type="button" class="btn btnLeft btn-base btn-lg" id="btnGoodsDetailImg">이미지보기</button> -->
+						</li>
+						<li class="right">
+							<th:block th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">
+							<button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDetailSave">저장</button>
+							</th:block>
+						</li>	
+					</ul>
+					<!-- //TABS BUTTON AREA -->
+				</div>
+				<!-- //TABS SPACE -->
+			</form>
+			</div>	<!--  class=panelContent -->
+		</div>	<!--  class=panelStyle -->
+	</div> <!--  class=modalPopup -->
+<script type="text/javascript" src="/ux/plugins/summernote/summernote.js?v=2020103001"></script>
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.summernote.js?v=2020103001"></script>
+<script th:inline="javascript">
+/*<![CDATA[*/
+
+	var sessRoleCd = [[${sessionInfo.roleCd}]];
+	var formalGbList = gagajf.convertToArray([[${formalGbList}]]);
+	var goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
+	var itemkindList = gagajf.convertToArray([[${itemkindList}]]);
+	var authBrandList = [[${authBrandList}]];
+	var useYnList = gagajf.convertToArray([[${useYnList}]]);
+	var goodsTypeList = gagajf.convertToArray([[${goodsTypeList}]]);
+	var uploadGoodsUrl = [[${@environment.getProperty('upload.goods.view')}]];
+	// Get a SmartEditor options
+	//var seOptions = gagaSe.getEditorOptions();
+	
+	// specify the columns - 상품변경이력
+	var columnGoodsHstoryDefs = [
+		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
+		{headerName: "변경일자", field: "regDt", width: 130, cellClass: 'text-center' ,
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
+			}
+		},
+		{headerName: "변경자", field: "regNm", width: 100, cellClass: 'text-center'},
+		{headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
+			,valueFormatter: function(params) { return Number(params.value).addComma();}
+		},
+		{headerName: "변경전판매가", field: "currBprice" , width: 100, cellClass: 'text-right'
+			,valueFormatter: function(params) { return Number(params.value).addComma(); }
+		},
+		{headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
+		},
+		{headerName: "상품명", field: "goodsNm" , width: 180, cellClass: 'text-left'},
+		{headerName: "상품타이틀", field: "goodsTnm" , width: 180, cellClass: 'text-left'},
+		/* {headerName: "상품검색어", field: "goodsSnm" , width: 180, cellClass: 'text-left'}, */
+		{headerName: "정상이월구분", field: "formalGb" , width: 100, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(formalGbList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(formalGbList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(formalGbList, params.newValue); }
+		},
+		{headerName: "품목", field: "itemkindCd" , width: 180, cellClass: 'text-left',
+			cellEditorParams: { values: gagaAgGrid.extractValues(itemkindList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(itemkindList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(itemkindList, params.newValue); }
+		},
+		{headerName: "최초승인일자", field: "frstCfrmDt", width: 150, cellClass: 'text-center' ,
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "재고연동여부", field: "erpStockLinkYn" , width: 100, cellClass: 'text-center'},
+		{headerName: "자사몰노출여부", field: "selfMallYn" , width: 120, cellClass: 'text-center'},
+		{headerName: "선물주문여부", field: "giftPackYn" , width: 120, cellClass: 'text-center'},
+		{headerName: "판매수수료율", field: "sellFeeRate" , width: 120, cellClass: 'text-right'},
+		{headerName: "사용자검색어", field: "goodsSnm1" , width: 150, cellClass: 'text-left'},
+		{headerName: "검색어", field: "goodsSnm" , width: 450, cellClass: 'text-left', tooltipField: "goodsSnm"}
+	];
+	
+	// specify the columns - 구성상품
+	var columnGoodsComposeDefs = [
+		{headerName: "정렬", field: "dispOrd", width: 70 ,hide: false, cellClass: 'text-center',  rowDrag: true },
+		{headerName: "CRUD", field: "crud", width: 75, minWidth: 75, hide: true},
+		//{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
+		{headerName: "이미지", field: "imgPath1", width: 100, height: 60, cellClass: 'text-center'
+			,cellRenderer: function(params) {
+				if (params.data.imgType == "G030_A"){
+					if(!gagajf.isNull(params.data.imgPath6)){
+						return '<img width="60" src="'+ params.data.imgPath1 + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
+					}else{
+						return '<img width="60" src="'+ params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
+					}	
+						
+				}else{
+					if(!gagajf.isNull(params.data.imgPath6)){
+						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
+					}else{
+						return '<img width="60" src="'+ uploadGoodsUrl+params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
+					}
+				}
+			}
+		},
+		{headerName: "상품타입", field: "goodsType" , width: 100, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(goodsTypeList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsTypeList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(goodsTypeList, params.newValue); }
+		},
+		{headerName: "구성상품코드", field: "compsGoodsCd" , width: 130, cellClass: 'text-center'},
+		{headerName: "구성상품코드명", field: "compsGoodsNm" , width: 200, cellClass: 'text-left'},
+		//{headerName: "순서", field: "dispOrd" , width: 80, cellClass: 'text-right',editable: true, required: true},
+		{headerName: "수량", field: "qty" , width: 80, cellClass: 'text-right'
+			,valueFormatter: function(params) { return Number(params.value).addComma();}
+		},
+		{headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
+			,valueFormatter: function(params) { return Number(params.value).addComma();}
+		},
+		{headerName: "상품판매가", field: "compsCurrPrice" , width: 100, cellClass: 'text-right'
+			,valueFormatter: function(params) { return Number(params.value).addComma();}, editable: true, required: true,
+			cellEditor: 'textCellEditor',
+			cellEditorParams: { maxlength: 14, validType: 'numeric'}
+		},
+		{headerName: "상품판매가ORG", field: "compsCurrPriceOrg" , width: 100, cellClass: 'text-right', hide: true},
+		{headerName: "기준여부(품목-카테고리)", field: "baseYn", width: 160, cellClass: 'text-center'},
+		{headerName: "전시여부", field: "useYn", width: 100, cellClass: 'text-center',editable: true,
+			cellEditor: 'agRichSelectCellEditor',
+			cellEditorParams: { values: gagaAgGrid.extractValues(useYnList), required: true },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(useYnList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(useYnList, params.newValue); }
+		},
+		{headerName: "옵션명(딜상품용)", field: "compsGoodsOptNm" , width: 200, cellClass: 'text-left',editable: true, required: true},
+		{headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
+		},
+		{headerName: "등록일시", field: "regDt", width: 140, cellClass: 'text-center' ,
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
+		{headerName: "수정일시", field: "updDt", width: 140, cellClass: 'text-center' ,
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "수정자", field: "updNm", width: 100, cellClass: 'text-center'}
+	];
+
+	// Get GridOptions
+	var gridGoodsHstoryOptions = gagaAgGrid.getGridOptions(columnGoodsHstoryDefs);
+	gridGoodsHstoryOptions.enableBrowserTooltips = true;
+	var gridGoodsComposeOptions = gagaAgGrid.getGridOptions(columnGoodsComposeDefs);
+	gridGoodsComposeOptions.enableBrowserTooltips = true;
+	
+	// 드래그
+	gridGoodsComposeOptions.suppressRowClickSelection = true;
+	gridGoodsComposeOptions.rowDragManaged = true;
+	gridGoodsComposeOptions.stopEditingWhenGridLosesFocus = true;
+	//gridGoodsComposeOptions.rowDeselection = true;
+	//gridGoodsComposeOptions.enableMultiRowDragging = true;
+	//gridGoodsComposeOptions.rowSelection = 'multiple';
+	
+	gridGoodsComposeOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
+	
+	//기준여부 표시
+	gridGoodsComposeOptions.getRowStyle = function(params) {
+		if ("Y" == params.data.baseYn) {
+			return { background: '#1ab394' };
+		}
+	}
+	
+	// 상품상세 조회
+	var fnGoodsDeailSearch = function() {
+
+		$('#goodsDetailForm').find('.tabs .tabsNav li a').attr("style", "color:#888;");  //탭색 초기화
+
+		var params = new Object();
+		params.mode = $('#goodsDetailForm input[name=mode]').val();
+		params.goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
+
+		cfnAjaxSubmit("/goods/detail", "json", fnGoodDetailSearchCallback, params);
+	}
+
+	var fnGoodDetailSearchCallback = function(result) {
+
+		$('#goodsDetailForm').find(".tabsNav > li").removeClass('on');
+		$('#goodsDetailForm').find(".tabsNav > li").eq(0).addClass('on');
+		$('#goodsDetailForm').find(".tabsCont > li").removeClass('on');
+		$('#goodsDetailForm').find(".tabsCont > li").eq(0).addClass('on');
+
+		if (result != null){
+			//기본정보
+			$('#goodsDetailForm select[name=selSupplyCompCd]').val(result.supplyCompCd);
+			$('#goodsDetailForm input[name=supplyCompCd]').val(result.supplyCompCd);
+			$('#goodsDetailForm input[name=brandCd]').val(result.brandCd);
+			fnBrand(result.supplyCompCd, result.brandCd);
+
+			$('#goodsDetailForm').find('#goodsCdTxt').html(result.goodsCd);
+			$('#goodsDetailForm').find('#supplyGoodsCdTxt').html(result.supplyGoodsCd);
+
+			$("#goodsDetailForm input[name=goodsImageYn]").val(result.goodsImageYn);
+			$("#goodsDetailForm input[name=niClsfCd]").val(result.niClsfCd);
+			$("#goodsDetailForm select[name=selNiClsfCd]").val(result.niClsfCd);
+			$("#goodsDetailForm input[name=selfGoodsYn]").val(result.selfGoodsYn);
+			$('#goodsDetailForm').find('#goodsNumTxt').html(result.goodsNum);
+			$('#goodsDetailForm input[name=goodsNum]').val(result.goodsNum);
+			$('#goodsDetailForm select[name=goodsStat]').val(result.goodsStat);
+			$("#goodsDetailForm input[name=goodsStatOrg]").val(result.goodsStat);
+			$('#goodsDetailForm').find('#brandGrpNmTxt').html(result.brandGrpNm);
+
+			$('#goodsDetailForm select[name=itemkindCd]').val(result.itemkindCd);
+			$('#goodsDetailForm input[name=orgItemkindCd]').val(result.itemkindCd);
+			$('#goodsDetailForm select[name=seasonCd]').val(result.seasonCd);
+			$('#goodsDetailForm input[name=seasonCdOrg]').val(result.seasonCd);
+			$('#goodsDetailForm select[name=sexGb]').val(result.sexGb);
+			$('#goodsDetailForm input[name=sexGbOrg]').val(result.sexGb);
+			$('#goodsDetailForm').find('#makeNmTxt').html(result.makeNm);
+			$('#goodsDetailForm').find('#styleYearTxt').html(result.styleYear);
+			$('#goodsDetailForm select[name=goodsGb]').val(result.goodsGb);
+			$('#goodsDetailForm input[name=goodsGbOrg]').val(result.goodsGb);
+			$('#goodsDetailForm input[name=mainColorCd]').val(result.mainColorCd);
+			
+
+			$("#goodsDetailForm input[name=goodsNm]").val(result.goodsNm);
+			$('#goodsDetailForm input[name=goodsNmOrg]').val(result.goodsNm);
+			fnDataLengthCheck('goodsNm',200);
+			$("#goodsDetailForm input[name=goodsTnm]").val(result.goodsTnm);
+			$('#goodsDetailForm input[name=goodsTnmOrg]').val(result.goodsTnm);
+			fnDataLengthCheck('goodsTnm',100);
+			$("#goodsDetailForm input[name=goodsSnm1]").val(result.goodsSnm1);
+			$("#goodsDetailForm input[name=goodsSnm1Org]").val(result.goodsSnm1);
+			fnDataLengthCheck('goodsSnm1',200);
+			$("#goodsDetailForm textarea[name=goodsSnmTxt]").val(result.goodsSnm);
+			$("#goodsDetailForm input[name=goodsSnm]").val(result.goodsSnm);
+			$('#goodsDetailForm').find('#listPriceTxt').html(result.listPrice.addComma());
+			$('#goodsDetailForm input[name=listPrice]').val(result.listPrice);
+			$('#goodsDetailForm input[name=currPrice]').val(result.currPrice.addComma());
+			$('#goodsDetailForm input[name=currPriceOrg]').val(result.currPrice);
+			$('#goodsDetailForm').find('#dcRateTxt').html(result.dcRate);
+			$('#goodsDetailForm input[name=dcRate]').val(result.dcRate);
+			$('#goodsDetailForm').find('#priceUpdDtTxt').html(!gagajf.isNull(result.priceUpdDt) ? result.priceUpdDt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '');
+			$('#goodsDetailForm').find('#frstCfrmDtTxt').html(!gagajf.isNull(result.frstCfrmDt) ? result.frstCfrmDt.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '');
+
+			$('#goodsDetailForm select[name=distributionGb]').val(result.distributionGb);
+			$("#goodsDetailForm input[name=distributionGbOrg]").val(result.distributionGb);
+			$('#goodsDetailForm select[name=ageGrpCd]').val(result.ageGrpCd);
+			$("#goodsDetailForm input[name=ageGrpCdOrg]").val(result.ageGrpCd);
+			
+			$("#goodsDetailForm input[type=radio]").parent().removeClass("checked");
+			$("#goodsDetailForm input[type=radio]").removeAttr('checked');
+			
+			if (result.formalGb == "G009_20"){
+				$("#goodsDetailForm input:radio[name=formalGb]:input[value='G009_20']").trigger('click');
+			}else{
+				$("#goodsDetailForm input:radio[name=formalGb]:input[value='G009_10']").trigger('click');
+			}
+			if (result.erpPriceLinkYn == "Y"){
+				$("#goodsDetailForm input:radio[name=erpPriceLinkYn]:input[value='Y']").trigger('click');
+			}else{
+				$("#goodsDetailForm input:radio[name=erpPriceLinkYn]:input[value='N']").trigger('click');
+			}
+			if (result.selfMallYn == "Y"){
+				$("#goodsDetailForm input:radio[name=selfMallYn]:input[value='Y']").trigger('click');
+			}else{
+				$("#goodsDetailForm input:radio[name=selfMallYn]:input[value='N']").trigger('click');
+			}
+			if (result.giftPackYn == "Y"){
+				$("#goodsDetailForm input:radio[name=giftPackYn]:input[value='Y']").trigger('click');
+			}else{
+				$("#goodsDetailForm input:radio[name=giftPackYn]:input[value='N']").trigger('click');
+			}
+			if (result.returnableYn == "Y"){
+				$("#goodsDetailForm input:radio[name=returnableYn]:input[value='Y']").trigger('click');
+			}else{
+				$("#goodsDetailForm input:radio[name=returnableYn]:input[value='N']").trigger('click');
+			}
+			
+			$('#goodsDetailForm input[name=sellFeeRate]').val(result.sellFeeRate);
+			$("#goodsDetailForm input[name=sellFeeRateOrg]").val(result.sellFeeRate);
+			
+			if (result.prePpntUsableYn == "Y"){
+				$("#goodsDetailForm input:radio[name=prePpntUsableYn]:input[value='Y']").trigger('click');
+			}else{
+				$("#goodsDetailForm input:radio[name=prePpntUsableYn]:input[value='N']").trigger('click');
+			}
+			if (result.preMpntUsableYn == "Y"){
+				$("#goodsDetailForm input:radio[name=preMpntUsableYn]:input[value='Y']").trigger('click');
+			}else{
+				$("#goodsDetailForm input:radio[name=preMpntUsableYn]:input[value='N']").trigger('click');
+			}
+			if (result.changeableYn == "Y"){
+				$("#goodsDetailForm input:radio[name=changeableYn]:input[value='Y']").trigger('click');
+			}else{
+				$("#goodsDetailForm input:radio[name=changeableYn]:input[value='N']").trigger('click');
+			}
+
+			$("#goodsDetailForm input[name=formalGbOrg]").val(result.formalGb);
+			$("#goodsDetailForm input[name=erpPriceLinkYnOrg]").val(result.erpPriceLinkYn);
+			$("#goodsDetailForm input[name=selfMallYnOrg]").val(result.selfMallYn);
+			$("#goodsDetailForm input[name=giftPackYnOrg]").val(result.giftPackYn);
+			$("#goodsDetailForm input[name=prePpntUsableYnOrg]").val(result.prePpntUsableYn);
+			$("#goodsDetailForm input[name=preMpntUsableYnOrg]").val(result.preMpntUsableYn);
+			$("#goodsDetailForm input[name=changeableYnOrg]").val(result.changeableYn);
+			$("#goodsDetailForm input[name=returnableYnOrg]").val(result.returnableYn);
+
+			$("#goodsDetailForm input[type=radio][checked]").addClass("checked");
+			//$("#goodsDetailForm input[type=radio][checked]").parent("label").addClass("checked");
+
+			//입점상품일 경우
+			if (result.selfGoodsYn == "N"){
+				//$('#goodsDetailForm').find('#erplinkarea').hide();
+				$("#goodsDetailForm").find("#selfGoodsDpTitle").html('원코드');
+				$("#goodsDetailForm").find("#selfGoodsDpTxt").html('<div id="supplyGoodsCdTxt"></div>');
+				$('#goodsDetailForm').find('#supplyGoodsCdTxt').html(result.supplyGoodsCd);
+				$('#goodsDetailForm select[name=distributionGb]').attr('readonly', true);
+			}
+			$('#goodsDetailForm input[name=delvFee]').val(result.delvFee.addComma());
+			$('#goodsDetailForm input[name=pntPrate]').val(result.pntPrate);
+			$('#goodsDetailForm input[name=pntPrateOrg]').val(result.pntPrate);
+			$('#goodsDetailForm input[name=pntMrate]').val(result.pntMrate);
+			$('#goodsDetailForm input[name=pntMrateOrg]').val(result.pntMrate);
+			$('#goodsDetailForm input[name=minOrdAmt]').val(result.minOrdAmt.addComma());
+			$('#goodsDetailForm input[name=minOrdAmtOrg]').val(result.minOrdAmt);
+			$('#goodsDetailForm input[name=minOrdQty]').val(result.minOrdQty);
+			$('#goodsDetailForm input[name=minOrdQtyOrg]').val(result.minOrdQty);
+			$('#goodsDetailForm input[name=maxOrdQty]').val(result.maxOrdQty);
+			$('#goodsDetailForm input[name=maxOrdQtyOrg]').val(result.maxOrdQty);
+			$('#goodsDetailForm input[name=dayMaxOrdQty]').val(result.dayMaxOrdQty);
+			$('#goodsDetailForm input[name=dayMaxOrdQtyOrg]').val(result.dayMaxOrdQty);
+			
+			$('#goodsDetailForm input[name=goodsType]').val(result.goodsType);
+			$("#goodsDetailForm").find("#goodsTypeNm").html(result.goodsTypeNm);
+			
+			//상품상세
+			// 공지내용. Summernote에 값 세팅
+			gagaSn.setContents('#goodsPcTopDesc', result.goodsPcTopDesc);
+			gagaSn.setContents('#goodsMobileTopDesc', result.goodsMobileTopDesc);
+			gagaSn.setContents('#goodsPcDownDesc', result.goodsPcDownDesc);
+			gagaSn.setContents('#goodsMobileDownDesc', result.goodsMobileDownDesc);
+
+			if (!gagajf.isNull(result.niClsfNm)){
+				$('#goodsDetailForm').find('#itemkindNoti').html('품목기준 고시분류 : ' + result.niClsfNm);
+				$('#goodsDetailForm input[name=niClsfNm]').val(result.niClsfNm);
+				var objNotiInfo = $("#goodsDetailForm select[name=selNiClsfCd] option");
+				for(var i=0;i<objNotiInfo.length; i++ ){
+					if (objNotiInfo.eq(i).text() == result.niClsfNm){
+						objNotiInfo.eq(i).prop("selected","true");
+					}
+				}
+			}
+
+			var goodsImg = "";
+			var goodsImgPath1 = "";
+			if (result.imgType == "G030_A"){
+				if (!gagajf.isNull(result.imgPath6)){
+					goodsImg = result.imgPath6;
+					goodsImgPath1 = result.imgPath6;
+				}else{
+					goodsImg = result.imgPath1;
+					goodsImgPath1 = result.imgPath1;
+				}
+				
+			}else{
+				if (!gagajf.isNull(result.imgPath6)){
+					goodsImg = uploadGoodsUrl+result.imgPath6;
+					goodsImgPath1 = result.imgPath6;
+				}else{
+					goodsImg = uploadGoodsUrl+result.imgPath1;
+					goodsImgPath1 = result.imgPath1;
+				}
+			}
+			$('#goodsDetailForm').find('#goodsImgUrl').attr('src',goodsImg);
+			$('#goodsDetailForm input[name=imgPath1]').val(goodsImgPath1);
+			$("#goodsDetailForm input[type=checkbox][checked]").parent("label").addClass("checked");
+
+			//품목변경 권한 관련 처리
+			//md권한
+			if(sessRoleCd == "G001_A101" || sessRoleCd == "G001_B000"){
+				var roleFlag = "N";
+				$.each(authBrandList, function(idx, item) {
+					if (result.brandCd == item.cd ){
+						roleFlag = "Y";
+						return false;
+					}
+				});
+				if (roleFlag == "N"){
+					$('#goodsDetailForm select[name=itemkindCd]').attr('disabled',true);
+					$('#goodsDetailForm #btnGoodsItemkindChange').addClass('off');
+				}
+			}
+
+			//상품 구분에 따른 컬럼 사용여부처리 start
+			//세트
+			if ("G056_S" == result.goodsType){
+				//$('#goodsDetailForm #erplinkarea').addClass('off');
+				if (result.selfGoodsYn == "Y") $('#goodsDetailForm #GoodsComposeTab').css('display','block');
+				$('#goodsDetailForm #goodsNotiTab').css('display','none');
+				$('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
+				$('#goodsDetailForm input[name=currPrice]').attr('readonly', true);
+			}else if ("G056_D" == result.goodsType){
+				//$('#goodsDetailForm #erplinkarea').addClass('off');
+				if (result.selfGoodsYn == "Y") $('#goodsDetailForm #GoodsComposeTab').css('display','block');
+				$('#goodsDetailForm #goodsNotiTab').css('display','none');
+				$('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
+			}
+			
+			//상품 구분에 따른 컬럼 사용여부처리 end
+			
+			var params = new Object();
+			params.mode = $('#goodsDetailForm input[name=mode]').val();
+			params.goodsCd = result.goodsCd;
+			params.brandCd = result.brandCd;
+			params.supplyCompCd = result.supplyCompCd;
+			params.niClsfCd = result.niClsfCd;
+			params.goodsType = result.goodsType;
+			params.erpPriceLinkYn = result.erpPriceLinkYn;
+
+			//옵셥 재고(ajax html)
+			fnGoodsDetailSizeStockSearch(params);
+			//정보고시
+			fnGoodsDetailNotiInfoSearch(params);
+			
+			//구성상품
+			if ("G056_S" == result.goodsType || "G056_D" == result.goodsType){
+				fnGoodsComposeListSearch(params);
+			}
+			//이력
+			fnGoodsDetailHstSearch();
+
+		}
+		
+		//기본정보탭 변경여부
+		$('#goodsDetailForm').find('#goodstab1').find("input, select, textarea").on('change', function() {
+			$('#goodsDetailForm').find('.tabs .tabsNav li:eq(0) a').attr("style", "color:red;");
+		});
+	}
+
+	//옵셥 재고
+	var fnGoodsDetailSizeStockSearch = function(params) {
+		cfnAjaxSubmit("/goods/detail/sizeStock/form", "html", "sizeStockArea", params);
+	}
+
+	//정보고시
+	var fnGoodsDetailNotiInfoSearch = function(params) {
+		cfnAjaxSubmit("/goods/detail/notiInfo/list", "json", fnGoodsDetailNotiInfoSearchCallback, params);
+	}
+	
+	//구성상품
+	var fnGoodsComposeListSearch = function(params) {
+		if ("G056_S" == params.goodsType){	//세트
+			gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'currPrice', false);
+			gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'useYn', false);
+			gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsGoodsOptNm', false);
+			
+			$('#GoodsComposeBtnArea').addClass("off");
+		}else{	//딜
+			gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'qty', false);
+			gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsCurrPrice', false);
+			gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsCurrPriceOrg', false);
+		}
+		gagaAgGrid.fetch("/goods/detail/compose/list?goodsCd=" + params.goodsCd , gridGoodsComposeOptions);
+	}
+	
+	//이력
+	var fnGoodsDetailHstSearch = function() {
+		gagaAgGrid.fetch("/goods/detail/hst/list?goodsCd=" + $('#goodsDetailForm input[name=goodsCd]').val() , gridGoodsHstoryOptions);
+	}
+	
+	//정보고시 콜백
+	var fnGoodsDetailNotiInfoSearchCallback = function(result) {
+		if (result == null) return;
+
+		var notiHtml = "";
+		var idx = 0;
+		$('#goodsDetailForm').find('#notiArea').html('');
+		notiHtml += '<table class="frmStyle">';
+		notiHtml += '<colgroup><col style="width:20%"/><col/><col style="width:5%"/><col style="width:5%"/></colgroup>';
+		notiHtml += '<tbody id="infoContents">\n';
+		notiHtml += '<tr><th>고시항목</th><th>고시내용</th><th>필수여부</th><th>전시여부</th></tr>';
+		result.forEach(function(info){
+			notiHtml += '<tr><th>'+ gagajf.convNull(info.niItemNm, '') +'<input type="hidden" name="niItemCd" value="'+ gagajf.convNull(info.niItemCd, '') +'" />\n<input type="hidden" name="dispOrd" value="'+ gagajf.convNull(info.dispOrd, '') +'" /></th>';
+			notiHtml += '<td><input type="text" name="niContent" value="'+ gagajf.convNull(info.niContent, '') +'"/></td>\n';
+			notiHtml += '<td class="aC">'+gagajf.convNull(info.reqYn, '')+'<input type="hidden" name="reqYn" value="'+ gagajf.convNull(info.reqYn, '') +'"/></td>\n';
+			notiHtml += '<td class="aC">'+gagajf.convNull(info.dispYn, '')+'<input type="hidden" name="dispYn" value="'+ gagajf.convNull(info.dispYn, '') +'"/></td>\n';
+			notiHtml += '</tr>\n';
+		});
+		notiHtml += '</tbody></table>';
+
+		$('#goodsDetailForm').find('#notiArea').append(notiHtml);
+
+		//고시정보탭 변경여부
+		$('#goodsDetailForm').find('#goodstab4').find("input, select, textarea").on('change', function() {
+			$('#goodsDetailForm').find('.tabs .tabsNav li:eq(3) a').attr("style", "color:red;");
+		});
+	}
+
+	//상품명 길이표시
+	$("#goodsDetailForm input[name=goodsNm]").bind('focus focusout input keyup keydown paste change', function () {
+		fnDataLengthCheck('goodsNm',200);
+	});
+
+	//상품타이틀 길이표시
+	$("#goodsDetailForm input[name=goodsTnm]").bind('focus focusout input keyup keydown paste change', function () {
+		fnDataLengthCheck('goodsTnm',100);
+	});
+	
+	//사용자검색어 길이표시
+	$("#goodsDetailForm input[name=goodsSnm1]").bind('focus focusout input keyup keydown paste change', function () {
+		fnDataLengthCheck('goodsSnm1',200);
+	});
+
+	//판매가 변경시 할인율 계산
+	$("#goodsDetailForm input[name=currPrice]").bind('focusout paste', function () {
+		fnCurrPriceCheck();
+	});
+
+	//판매가의 할인율 확인
+	var fnCurrPriceCheck = function(){
+		var dcRate = 0;
+
+		var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
+		var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
+		dcRate =  100 - Math.floor(Number(currPrice) / Number(listPrice) * 100);	//절사
+
+		$("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
+		$("#goodsDetailForm input[name=dcRate]").val(dcRate);
+
+	}
+
+	//판매가의 할인율 확인
+	/* var fnCurrPriceCheck_org = function(){
+		var dcRate = 0;
+
+		var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
+		var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
+		//dcRate = Math.round(100 - Math.floor((Number(currPrice) / Number(listPrice) * 100)*100)/100);
+		//dcRate = 100 - (Number((Number(currPrice) / Number(listPrice)).toFixed(2)) *100);
+		dcRate =  100 - Math.floor(Number(currPrice) / Number(listPrice) * 100);
+
+		if (dcRate < 0){
+			mcxDialog.alert('할인율이 0보다 작습니다.\n판매가를 확인해주세요.', function(){
+				$("#goodsDetailForm input[name=currPrice]").focus();
+			});
+			return false;
+		}else if (dcRate >= 90){
+			gagaAlert.confirm("할인율이 90%이상입니다. 계속하시겠습니까?", function(){
+				$("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
+				$("#goodsDetailForm input[name=dcRate]").val(dcRate);
+				return true;
+			},
+			function(){
+				$('#goodsDetailForm input[name=currPrice]').val($('#goodsDetailForm input[name=currPriceOrg]').val().addComma());
+				return false;
+			});
+
+		}else{
+			$("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
+			$("#goodsDetailForm input[name=dcRate]").val(dcRate);
+			return true;
+		}
+	} */
+
+	// 브랜드 조회
+	var fnBrand = function(supplyCompCd, brandCd) {
+		var actionUrl = '/renderer/supplyCompany/brand/list/' + supplyCompCd;
+
+		if(sessRoleCd == "G001_B000"){
+			actionUrl = '/renderer/brand/AuthBrandlist';
+		}
+		$("#goodsDetailForm select[name=selBrandCd] option:gt(0)").remove();
+
+		cfnCreateCombo(actionUrl, $('#goodsDetailForm select[name=selBrandCd]'), "[선택]", brandCd);
+
+	}
+
+	//데이터 길이 확인
+	var fnDataLengthCheck = function(id , maxByte){
+		var maximumByte = maxByte;
+		var strLenEng = $('#goodsDetailForm').find('#'+id).val().length;
+		var cbyteStr = 0;
+		var liLenStr = 0;
+		for (i = 0; i < strLenEng; i++) {
+			var lsOneChar = $('#goodsDetailForm').find('#'+id).val().charAt(i);
+			if (lsOneChar == "\n" || lsOneChar == "\'") {
+				cbyteStr += 5; //엔터면 5를 더한다
+			} else if (lsOneChar == "\"") {
+				cbyteStr += 6; //쌍따옴표면 6를 더한다
+			} else if (escape(lsOneChar).length > 4) {
+				cbyteStr += 3; //한글이면 3를 더한다
+			} else {
+				cbyteStr++; //한글아니면 1을 다한다
+			}
+			if (cbyteStr <= maximumByte) {
+				liLenStr = i + 1;
+			}
+		}
+
+		// 사용자가 입력한 값이 제한 값을 초과하는지를 검사한다.
+		if (parseInt(cbyteStr) > parseInt(maximumByte)) {
+			mcxDialog.alertC('허용된 글자수가 초과되었습니다.\n초과된 부분은 자동으로 삭제됩니다.', {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$('#goodsDetailForm').find('#'+id).focus();
+				}
+			});
+			var str = $('#goodsDetailForm').find('#'+id).val().substr(0, liLenStr);
+			$('#goodsDetailForm').find('#'+id).val(str);
+			var cbyteStr = 0;
+			for (i = 0; i < $('#goodsDetailForm').find('#'+id).val().length; i++) {
+				var lsOneChar = $('#goodsDetailForm').find('#'+id).val().charAt(i);
+				if (lsOneChar == "\n" || lsOneChar == "\'") {
+					cbyteStr += 5; //엔터면 5를 더한다
+				} else if (lsOneChar == "\"") {
+					cbyteStr += 6; //쌍따옴표면 6를 더한다
+				} else if (escape(lsOneChar).length > 4) {
+					cbyteStr += 3; //한글이면 3를 더한다
+				} else {
+					cbyteStr++; //한글아니면 1을 다한다
+				}
+			}
+		}
+
+		$('#goodsDetailForm').find('#'+id+'Len').text(cbyteStr);
+	}
+
+	//상품저장 버튼 클릭 시
+	$('#btnGoodsDetailSave').click(function() {
+
+		var optCheck = false;
+		var idx = 0;
+
+		//상품상태가 승인대기나 승인 완료일 경우
+		if($("#goodsDetailForm select[name=goodsStat]").val() == "G008_40" || $("#goodsDetailForm select[name=goodsStat]").val() == "G008_90"){
+
+			// SUPER관리자, 어드민관리자, 계정관리자. 총괄관리자, MD 를 제외하고 승인처리 할수 없음
+			if ("G001_0000" != sessRoleCd && "G001_A000" != sessRoleCd && "G001_A001" != sessRoleCd && "G001_A100" != sessRoleCd && "G001_A101" != sessRoleCd ){
+				if ($("#goodsDetailForm select[name=goodsStat]").val() == "G008_90" &&  $("#goodsDetailForm select[name=goodsStatOrg]").val() != "G008_90"){
+					mcxDialog.alert(" '승인완료' 상태로 변경할 권한이 없습니다.");
+					return false;
+				}
+				
+			}
+			//list가 등록되지 않은 상품은 상태변경 불가
+			if(Number($("#goodsDetailForm input[name=listPrice]").val()) == 0){
+				mcxDialog.alertC("TAG가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$("#goodsDetailForm select[name=goodsStat]").focus();
+					}
+				});
+				return false;
+			}
+
+			//판매가가 0인  상품은 상태변경 불가
+			if((gagajf.isNull($("#goodsDetailForm input[name=currPrice]").val()) || $("#goodsDetailForm input[name=currPrice]").val() == 0)){
+				mcxDialog.alertC("판매가가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$("#goodsDetailForm select[name=goodsStat]").focus();
+					}
+				});
+				return;
+			}
+
+			//사이즈정보가 등록되지 않은 상품은 상태변경 불가
+			if($("#goodsDetailForm #sizeStockArea").find("#optionList tr").length == 0){
+				mcxDialog.alertC("사이즈정보가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$("#goodsDetailForm select[name=goodsStat]").focus();
+					}
+				});
+				return;
+			}
+
+			//이미지가 등록되지 않은 상품은 상태변경 불가
+			if($("#goodsDetailForm input[name=goodsImageYn]").val() == "N"){
+				mcxDialog.alertC("이미지가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$("#goodsDetailForm select[name=goodsStat]").focus();
+					}
+				});
+				return;
+			}
+
+			//고시정보가 등록되지 않은 상품은 상태변경 불가 - 일반상품만 체크
+			if ("G056_N" == $("#goodsDetailForm input[name=goodsType]").val()){
+				if($("#goodsDetailForm #notiArea").find("#infoContents tr").length == 0){
+					mcxDialog.alertC("고시정보가 등록되지 않은 상품은 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$("#goodsDetailForm select[name=goodsStat]").focus();
+						}
+					});
+					return;
+				}
+
+				idx = 0;
+
+				$("#goodsDetailForm #notiArea").find("#infoContents tr").each(function() {
+					if ("Y" == $(this).find("input[name=reqYn]").val() ||  "Y" == $(this).find("input[name=dispYn]").val()){
+						if (gagajf.isNull($(this).find("input[name=niContent]").val())){
+							optCheck = true;
+							mcxDialog.alertC("고시정보를 입력해주세요.");
+							return false;
+						}
+					}
+					idx++;
+				});
+			}
+			
+			// 자사일 경우 대표색상 선택 여부
+			if ("Y" == $('#goodsDetailForm input[name=selfGoodsYn]').val()){
+				
+				if($("#goodsDetailForm input[name=basicColor]:checked").length == 0) {
+					mcxDialog.alert("대표색상을 선택해주세요.")
+					return false;
+				}
+			}
+			
+		}
+
+		if(optCheck) {
+			return false;
+		}
+
+		//상품명
+		if(gagajf.isNull($("#goodsDetailForm input[name=goodsNm]").val())){
+			mcxDialog.alertC("상품명을 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=goodsNm]").focus();
+				}
+			});
+			return;
+		}
+
+		//상품상태
+		if(gagajf.isNull($("#goodsDetailForm select[name=goodsStat]").val())){
+			mcxDialog.alertC("상품상태를 선택해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm select[name=goodsStat]").focus();
+				}
+			});
+			return;
+		}
+
+		//성별
+		if(gagajf.isNull($("#goodsDetailForm select[name=sexGb]").val())){
+			mcxDialog.alertC("성별을 선택해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm select[name=sexGb]").focus();
+				}
+			});
+			return;
+		}
+
+		//시즌
+		if(gagajf.isNull($("#goodsDetailForm select[name=seasonCd]").val())){
+			mcxDialog.alertC("시즌을 선택해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm select[name=seasonCd]").focus();
+				}
+			});
+			return;
+		}
+
+		//판매가
+		if(gagajf.isNull($("#goodsDetailForm input[name=currPrice]").val())) {
+			mcxDialog.alertC("판매가를 올바르게 입력해주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=currPrice]").focus();
+				}
+			});
+			return false;
+		}
+		
+		/* if(Number($("#goodsDetailForm input[name=currPrice]").val().removeComma()) < 1000) {
+			mcxDialog.alertC("판매가는 1000원 이상을 입력하셔야 합니다.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=currPrice]").focus();
+				}
+			});
+		} */
+
+		//정상가와 판매가 비교
+		if(Number($("#goodsDetailForm input[name=listPrice]").val().removeComma()) < Number($("#goodsDetailForm input[name=currPrice]").val().removeComma())) {
+			mcxDialog.alertC("판매가를 올바르게 입력해주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=currPrice]").focus();
+				}
+			});
+			return false;
+		}
+		//판매 수수료율
+		if ( gagajf.isNull($("#goodsDetailForm input[name=sellFeeRate]").val())) {
+			mcxDialog.alertC("판매수수료를 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=sellFeeRate]").focus();
+				}
+			});
+			return false;
+		}
+		if(Number($("#goodsDetailForm input[name=sellFeeRate]").val()) < 0 || Number($("#goodsDetailForm input[name=sellFeeRate]").val()) > 100) {
+			mcxDialog.alertC("판매수수료를 올바르게 입력해주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=sellFeeRate]").focus();
+				}
+			});
+			return false;
+		}
+		// 포인트
+		if ( gagajf.isNull($("#goodsDetailForm input[name=pntPrate]").val())) {
+			mcxDialog.alertC("PC 포인트를 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=pntPrate]").focus();
+				}
+			});
+			return false;
+		}
+		if(Number($("#goodsDetailForm input[name=pntPrate]").val()) < 0 || Number($("#goodsDetailForm input[name=pntPrate]").val()) > 100) {
+			mcxDialog.alertC("PC 포인트를 올바르게 입력해주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=pntPrate]").focus();
+				}
+			});
+			return false;
+		}
+		if ( gagajf.isNull($("#goodsDetailForm input[name=pntMrate]").val())) {
+			mcxDialog.alertC("MOBILE 포인트를 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=pntMrate]").focus();
+				}
+			});
+			return false;
+		}
+		if(Number($("#goodsDetailForm input[name=pntMrate]").val()) < 0 || Number($("#goodsDetailForm input[name=pntMrate]").val()) > 100) {
+			mcxDialog.alertC("MOBILE 포인트를 올바르게 입력해주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=pntMrate]").focus();
+				}
+			});
+			return false;
+		}
+		
+		// 주문수량
+		if ( gagajf.isNull($("#goodsDetailForm input[name=minOrdQty]").val())) {
+			mcxDialog.alertC("최소주문 수량을 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=minOrdQty]").focus();
+				}
+			});
+			return false;
+		}
+		if (Number($("#goodsDetailForm input[name=minOrdQty]").val()) <= 0) {
+			mcxDialog.alertC("최소주문 수량을 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=minOrdQty]").focus();
+				}
+			});
+			return false;
+		}
+		if ( gagajf.isNull($("#goodsDetailForm input[name=maxOrdQty]").val())) {
+			mcxDialog.alertC("최대주문 수량을 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=maxOrdQty]").focus();
+				}
+			});
+			return false;
+		}
+		if (Number($("#goodsDetailForm input[name=maxOrdQty]").val()) <= 0) {
+			mcxDialog.alertC("최대주문 수량을 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=maxOrdQty]").focus();
+				}
+			});
+			return false;
+		}
+		if ( gagajf.isNull($("#goodsDetailForm input[name=dayMaxOrdQty]").val())) {
+			mcxDialog.alertC("ID당1일최대구매 수량을 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=dayMaxOrdQty]").focus();
+				}
+			});
+			return false;
+		}
+		if (Number($("#goodsDetailForm input[name=dayMaxOrdQty]").val()) <= 0) {
+			mcxDialog.alertC("ID당1일최대구매 수량을 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=dayMaxOrdQty]").focus();
+				}
+			});
+			return false;
+		}
+
+		if(Number($("#goodsDetailForm input[name=minOrdQty]").val()) > Number($("#goodsDetailForm input[name=maxOrdQty]").val())){
+			mcxDialog.alertC("최소주문수량은 최대주문수량보다 클 수 없습니다.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=minOrdQty]").focus();
+				}
+			});
+			return false;
+		}
+		
+		if(Number($("#goodsDetailForm input[name=maxOrdQty]").val()) > Number($("#goodsDetailForm input[name=dayMaxOrdQty]").val())){
+			mcxDialog.alertC("최대주문수량이 ID당1일최대구매수량보다 클 수 없습니다.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=maxOrdQty]").focus();
+				}
+			});
+			return false;
+		}
+
+		// 무료배송비
+		if ( gagajf.isNull($("#goodsDetailForm input[name=minOrdAmt]").val())) {
+			mcxDialog.alertC("무료 배송 금액을 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=minOrdAmt]").focus();
+				}
+			});
+			return false;
+		}
+		if (Number($("#goodsDetailForm input[name=minOrdAmt]").val().removeComma()) <= 0) {
+			mcxDialog.alertC("무료 배송 금액을 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=minOrdAmt]").focus();
+				}
+			});
+			return false;
+		}
+
+		//if (optCheck) return false;
+
+		idx = 0;
+
+		//재고 옵션 관련 확인
+		$("#goodsDetailForm input[name=chStockDataYn]").val('N');
+
+		$("#optionList tr").each(function() {
+			var optCd1 = $(this).find("input[name=optCd1]").val();
+			var optCd2 = $(this).find("input[name=optCd2]").val();
+			var hidOptCd1 = $(this).find("input[name=hidOptCd1]").val();
+			var hidOptCd2 = $(this).find("input[name=hidOptCd2]").val();
+			var baseStockQty = $(this).find("input[name=baseStockQty]").val();
+			var hidBaseStockQty = $(this).find("input[name=hidBaseStockQty]").val();
+			var dispOrd = $(this).find("input[name=dispOrd]").val();
+			var hidDispOrd = $(this).find("input[name=hidDispOrd]").val();
+			var dispYn = $(this).find("select[name=dispYn]").val();
+			var hidDispYn = $(this).find("input[name=hidDispYn]").val();
+			var soldoutYn = $(this).find("select[name=soldoutYn]").val();
+			var hidSoldoutYn = $(this).find("input[name=hidSoldoutYn]").val();
+
+			var editCurrStockQty = $(this).find("input[name=editCurrStockQty]").val();	// 입점 확인용
+			var currStockQty = $(this).find("input[name=currStockQty]").val();	// 입점 확인용 (hidden)
+			
+			if(gagajf.isNull(dispOrd)){
+				optCheck = true;
+				mcxDialog.alertC("우선순위를 입력해주세요", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$("#optionList tr").find("input[name=dispOrd]").eq(idx).focus();
+					}
+				});
+				return false;
+			}
+
+			//ERP재고연동여부가 'Y'일 경우 수정여부 확인
+		/* 	if ( $('#goodsDetailForm input[name=erpStockLinkYn]:checked').val() == "Y"){
+				if (Number(editCurrStockQty) != Number(currStockQty) ){
+					optCheck = true;
+					mcxDialog.alertC("ERP가용재고가 변경되었습니다.<br/>확인해주세요", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$("#optionList tr").find("input[name=erpStockLinkYn]").eq(idx).focus();
+						}
+					});
+					return false;
+				}
+			} */
+
+			// 입점만 체크
+			if ("N" == $('#goodsDetailForm input[name=selfGoodsYn]').val()){
+				
+				if(gagajf.isNull(editCurrStockQty)){
+					optCheck = true;
+					mcxDialog.alertC("가용재고를 입력해주세요", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							$("#optionList tr").find("input[name=editCurrStockQty]").eq(idx).focus();
+						}
+					});
+					return false;
+				}
+			}
+			
+			if(gagajf.isNull(baseStockQty)){
+				optCheck = true;
+				mcxDialog.alertC("안전재고를 입력해주세요", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$("#optionList tr").find("input[name=baseStockQty]").eq(idx).focus();
+					}
+				});
+				return false;
+			}
+			
+			if (optCd1 != hidOptCd1){
+				$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
+			}
+			
+			if (optCd2 != hidOptCd2){
+				$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
+			}
+			
+			if (editCurrStockQty != currStockQty){
+				$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
+			}
+			
+			if (baseStockQty != hidBaseStockQty){
+				$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
+			}
+			
+			if (dispOrd != hidDispOrd){
+				$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
+			}
+
+			if (dispYn != hidDispYn){
+				$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
+			}
+			
+			if (soldoutYn != hidSoldoutYn){
+				$("#goodsDetailForm input[name=chStockDataYn]").val('Y');
+			}
+
+			idx++;
+		});
+
+		if(optCheck) {
+			return false;
+		}
+		
+		var basicColor = $("#goodsDetailForm input[name=basicColor]:checked").val();
+		
+		var dcRate = 0;
+		var listPrice = $("#goodsDetailForm input[name=listPrice]").val().removeComma();
+		var currPrice = $("#goodsDetailForm input[name=currPrice]").val().removeComma();
+		dcRate =  100 - Math.floor(Number(currPrice) / Number(listPrice) * 100);	//절사
+			
+		if (dcRate < 0){
+			mcxDialog.alertC('할인율이 0보다 작습니다.\n판매가를 확인해주세요.', {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=currPrice]").focus();
+				}
+			});
+			return false;
+		}else if (dcRate >= 90){
+			mcxDialog.confirmC("할인율이 90%이상입니다. 계속하시겠습니까?", {
+				btn: ["아니요","예"],
+				btnClick: function(index){
+					if (index == 1){
+						optCheck = true;
+					} else {
+						if (!fnGoodsComposeCheck()) return false;
+						fnSaveCheck();
+					}
+				}
+			});
+
+		}else{
+			$("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
+			$("#goodsDetailForm input[name=dcRate]").val(dcRate);
+			if (!fnGoodsComposeCheck()) return false;
+			fnSaveCheck();
+		}
+		
+		if (optCheck) return false;
+		
+	});
+	
+	//저장 관련 체크
+	var fnSaveCheck = function(idx){
+		if($("#goodsDetailForm input:checkbox[name=chkDescKeep]").is(':checked')){
+			mcxDialog.confirmC("'정보유지' 체크박스가 선택되어 있어 '상품상세설명' 항목이 저장되지 않습니다.<br/>저장을 원하시면 체크를 해제하세요. 계속하시겠습니까?", {
+				btn: ["아니요","예"],
+				btnClick: function(index){
+					if (index == 1){
+						optCheck = true;
+					} else {
+						fnGoodsSave();
+					}
+				}
+			});
+		}else{
+			fnGoodsSave();
+		}
+	}
+
+	// 구성 정보 관련 체크
+	var fnGoodsComposeCheck = function(){
+		if ($("#goodsDetailForm input[name=goodsType]").val() == "G056_N"){
+			return true;	
+		}
+		
+		var allData = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
+		var comSupplyCompCd = '';
+		var comSelfGoodsYn = '';
+		//기준여부 Y  존재하는지 확인
+		var checkBaseYn = false;
+		optCheck = false;
+		$.each(allData, function(index, item) {
+			if (index == 0){
+				comSelfGoodsYn = item.selfGoodsYn;
+				comSupplyCompCd = item.supplyCompCd;
+			}
+			
+			if (item.baseYn == "Y"){
+				checkBaseYn = true;
+			}
+			
+			if (comSelfGoodsYn != item.selfGoodsYn){
+				optCheck = true;
+				mcxDialog.alertC("구성상품중 자사/입점상품 구분값이 다릅니다.<br/>확인해 주세요", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						gridGoodsComposeOptions.api.setFocusedCell(index, "goodsCd", null);
+					}
+				});	
+				return false;
+				/*
+			}else{
+				
+				
+				if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
+					optCheck = true;
+					mcxDialog.alertC("구성상품중 입점은 같은 업체 상품만 가능합니다.<br/>확인해 주세요", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							gridGoodsComposeOptions.api.setFocusedCell(index, "goodsCd", null);
+						}
+					});	
+					return false;
+				}
+				*/
+			}
+			
+			// 세트 가격 체크
+			if ($("#goodsDetailForm input[name=goodsType]").val() == "G056_S"){
+				if (item.compsCurrPrice <= 0){
+					optCheck = true;
+					mcxDialog.alertC("구성상품 판매가를 확인해 주세요", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							gridGoodsComposeOptions.api.setFocusedCell(index, "compsCurrPrice", null);
+						}
+					});	
+					return false;
+				}
+			}
+			
+		});
+		
+		if(optCheck) {
+			return false;
+		}
+		
+		if (!checkBaseYn){
+			mcxDialog.alert('구성상품중 기준여부를 선택해 주세요.');
+			return false;
+		}
+		
+		return true;
+	}
+
+	//저장처리
+	var fnGoodsSave = function(){
+		mcxDialog.confirm('저장하시겠습니까?', {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function(){
+
+				fnGoodsDeailNotiSave();
+
+				if (fnChangeCheck()){
+					$("#goodsDetailForm input[name=chDataYn]").val('Y');
+				}else{
+					$("#goodsDetailForm input[name=chDataYn]").val('N');
+				}
+				$("#goodsDetailForm input[name=mainColorCd]").val($("#goodsDetailForm input[name=basicColor]:checked").val());
+				
+				//구성상품
+				var allData = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
+				var jsonData = JSON.stringify(allData);
+				$('#goodsDetailForm input[name=goodsComposeList]').val(jsonData);
+				
+				$('#goodsDetailForm input[name=goodsNm]').val($('#goodsDetailForm input[name=goodsNm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, "&quot;").replace(/\'/gi, "&#39;"));
+				$('#goodsDetailForm input[name=goodsTnm]').val($('#goodsDetailForm input[name=goodsTnm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, "&quot;").replace(/\'/gi, "&#39;"));
+				$('#goodsDetailForm input[name=goodsSnm1]').val($('#goodsDetailForm input[name=goodsSnm1]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, "&quot;").replace(/\'/gi, "&#39;"));
+	
+				gagajf.ajaxFormSubmit("/goods/detail/save", "#goodsDetailForm", fnGoodsSaveCallBack); 
+			}
+		});
+	}
+
+	//미리보기 클릭 시
+	$('#btnGoodsDetailPreview').click(function(e) {
+		cfnOpenFrontGoodsPopup($('#goodsDetailForm input[name=goodsCd]').val(), $('#goodsDetailForm input[name=siteCd]').val());
+	});
+
+	//이미지 클릭 시
+	$('#btnGoodsDetailImg').click(function(e) {
+		cfnOpenGoodsImagePopup($('#goodsDetailForm input[name=goodsCd]').val());
+	});
+	
+	//창종료
+	var fnGoodsDetailClose = function(){
+		uifnPopupClose('popupGoodsDetail');
+	}
+
+	//저장후 callback
+	var fnGoodsSaveCallBack = function(){
+		var goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
+		fnGoodsDetailClose();
+		cfnOpenGoodsDetailPopup('U', goodsCd);
+	}
+
+	//고시정보 저장을 위한 데이터 처리
+	var fnGoodsDeailNotiSave = function(){
+
+		var goodsCd = $('#goodsDetailForm input[name=goodsCd]').val();
+		var goodsInfoList = [];
+
+		var index = 0;
+		$("#goodsDetailForm").find("#infoContents tr").each(function() {
+			if (index > 0){
+				var goodsInfo = {goodsCd: goodsCd
+						, niClsfCd : $('#goodsDetailForm input[name=niClsfCd]').val()
+						, niItemCd : $(this).find("input[name=niItemCd]").val()
+						, niContent : $(this).find("input[name=niContent]").val()
+						, dispOrd : $(this).find("input[name=dispOrd]").val()
+						};
+				goodsInfoList.push(goodsInfo);	
+			}
+			index++;
+		});
+
+		$("#goodsDetailForm input[name=notiList]").val(JSON.stringify(goodsInfoList));
+	}
+
+	//상품기본정보 변경여부 확인
+	var fnChangeCheck = function(){debugger;
+		
+		//상품타이틀
+		if ($("#goodsDetailForm input[name=goodsTnmOrg]").val() != $("#goodsDetailForm input[name=goodsTnm]").val()){
+			return true;
+		}
+		//사용자검색어
+		if ($("#goodsDetailForm input[name=goodsSnm1Org]").val() != $("#goodsDetailForm input[name=goodsSnm1]").val()){
+			return true;
+		}
+		//상품명
+		if ($("#goodsDetailForm input[name=goodsNmOrg]").val() != $("#goodsDetailForm input[name=goodsNm]").val()){
+			return true;
+		}
+		//상품정상이월구분
+		if ($("#goodsDetailForm input[name=formalGbOrg]").val() != $("input:radio[name=formalGb]:checked").val()){
+			return true;
+		}
+		//상품구분
+		if ($("#goodsDetailForm input[name=goodsGbOrg]").val() != $("#goodsDetailForm select[name=goodsGb]").val()){
+			return true;
+		}
+		//상품상태
+		if ($("#goodsDetailForm input[name=goodsStatOrg]").val() != $("#goodsDetailForm select[name=goodsStat]").val()){
+			return true;
+		}
+		//시즌
+		if ($("#goodsDetailForm input[name=seasonCdOrg]").val() != $("#goodsDetailForm select[name=seasonCd]").val()){
+			return true;
+		}
+		//성별
+		if ($("#goodsDetailForm input[name=sexGbOrg]").val() != $("#goodsDetailForm select[name=sexGb]").val()){
+			return true;
+		}
+		//판매가
+		if ($("#goodsDetailForm input[name=currPriceOrg]").val() != $("#goodsDetailForm input[name=currPrice]").val().removeComma()){
+			return true;
+		}
+		
+		//자사 일반상품만 
+		if($("#goodsDetailForm input[name=selfGoodsYn]").val() == 'Y' && $("#goodsDetailForm input[name=goodType]").val() == 'G056_N'){
+			//ERP재고연동여부
+			if ($("#goodsDetailForm input[name=erpStockLinkYnOrg]").val() != $("#goodsDetailForm input[name=erpStockLinkYn]:checked").val()){
+				return true;
+			}
+		}
+		
+		//자사몰 노출여부
+		if ($("#goodsDetailForm input[name=selfMallYnOrg]").val() != $("input[name=selfMallYn]:checked").val()){
+			return true;
+		}
+		//선물주문여부
+		if ($("#goodsDetailForm input[name=giftPackYnOrg]").val() != $("input[name=giftPackYn]:checked").val()){
+			return true;
+		}
+		//PC포인트 
+		if ($("#goodsDetailForm input[name=pntPrateOrg]").val() != $("#goodsDetailForm input[name=pntPrate]").val()){
+			return true;
+		}
+		//PC 선포인트 사용여부
+		if ($("#goodsDetailForm input[name=prePpntUsableYnOrg]").val() != $("input[name=prePpntUsableYn]:checked").val()){
+			return true;
+		}
+		//MOBILE포인트
+		if ($("#goodsDetailForm input[name=pntMrateOrg]").val() != $("#goodsDetailForm input[name=pntMrate]").val()){
+			return true;
+		}
+		//MOBILE 선포인트 사용여부
+		if ($("#goodsDetailForm input[name=preMpntUsableYnOrg]").val() != $("input[name=preMpntUsableYn]:checked").val()){
+			return true;
+		}
+		//최소주문수량
+		if ($("#goodsDetailForm input[name=minOrdQtyOrg]").val() != $("#goodsDetailForm input[name=minOrdQty]").val()){
+			return true;
+		}
+		//최대주문수량
+		if ($("#goodsDetailForm input[name=maxOrdQtyOrg]").val() != $("#goodsDetailForm input[name=maxOrdQty]").val()){
+			return true;
+		}
+		//ID당1일최대구매수량
+		if ($("#goodsDetailForm input[name=dayMaxOrdQtyOrg]").val() != $("#goodsDetailForm input[name=dayMaxOrdQty]").val()){
+			return true;
+		}
+		//무료배송기준
+		if ($("#goodsDetailForm input[name=minOrdAmtOrg]").val() != $("#goodsDetailForm input[name=minOrdAmt]").val().removeComma()){
+			return true;
+		}
+		//유통구분
+		if ($("#goodsDetailForm input[name=distributionGbOrg]").val() != $("#goodsDetailForm select[name=distributionGb]").val()){
+			return true;
+		}
+		//상품연령대
+		if ($("#goodsDetailForm input[name=ageGrpCdOrg]").val() != $("#goodsDetailForm select[name=ageGrpCd]").val()){
+			return true;
+		}
+		// 판매수수료율
+		if ($("#goodsDetailForm input[name=sellFeeRateOrg]").val() != $("#goodsDetailForm input[name=sellFeeRate]").val()){
+			return true;
+		}
+		// 메인 색상코드
+		if ($("#goodsDetailForm input[name=mainColorCd]").val() != $("#goodsDetailForm input[name=basicColor]:checked").val()){
+			return true;
+		}
+		// 반품가능여부
+		if ($("#goodsDetailForm input[name=returnableYnOrg]").val() != $("input[name=returnableYn]:checked").val()){
+			return true;
+		}
+		
+		return false;
+	}
+
+	// 상품 고시 선택 버튼 클릭 시
+	$('#btnNotinfo').click(function(e) {
+
+		if(gagajf.isNull($("#goodsDetailForm select[name=selNiClsfCd]").val())) {
+			mcxDialog.alertC("상품정보제공 고시를 선택해주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm select[name=selNiClsfCd]").focus();
+				}
+			});
+			return false;
+		}
+
+		// 고시정보 수정은 맘대로 할수 있음 20200821 신현장 부장 확인
+		/* if ($("#goodsDetailForm input[name=niClsfCd]").val() != $("#goodsDetailForm select[name=selNiClsfCd]").val()){
+			mcxDialog.alertC("상품의 고시분류는 [" + $("#goodsDetailForm input[name=niClsfNm]").val() +"] 입니다."  , {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm select[name=selNiClsfCd]").focus();
+				}
+			});
+			return false;
+		} */
+
+		var params = new Object();
+		params.supplyCompCd = $("#goodsDetailForm input[name=supplyCompCd]").val();
+		params.niClsfCd = $("#goodsDetailForm select[name=selNiClsfCd]").val();
+		params.goodsCd = $("#goodsDetailForm input[name=goodsCd]").val();
+		cfnAjaxSubmit("/goods/noti/goodsInfo/list", "json", fnGoodsDetailNotiInfoSearchCallback, params);
+
+	});
+
+	// 품목변경
+	$("#btnGoodsItemkindChange").on("click", function(){
+
+		if($("#goodsDetailForm  select[name=itemkindCd]").val() == $("#goodsDetailForm  input[name=orgItemkindCd]").val()){
+			mcxDialog.alert("품목코드가 변경되지 않았습니다.");
+			return false;
+		}
+
+		mcxDialog.confirm('품목변경 하시겠습니까?', {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function(){
+				var data = [{  goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
+						, itemkindCd : $("#goodsDetailForm  select[name=itemkindCd]").val()
+						, supplyCompCd : $("#goodsDetailForm  input[name=supplyCompCd]").val()
+						}];
+				var jsonData = JSON.stringify(data);
+				gagajf.ajaxJsonSubmit('/goods/itemKind/change/save', jsonData, fnGoodsDeailSearch);
+			}
+		});
+	});
+	
+	// 구성상품 조회 팝업
+	var fnOpenGoodsDetailPopup = function() {
+		cfnOpenGoodsPopup('fnGoodsDetailGoodsDeal');
+	}
+
+	// 구성상품 조회 팝업 - 상품추가
+	var fnGoodsDetailGoodsDeal = function(goodsData) {
+		if (goodsData.length < 1) return;
+		
+		// 기존상품
+		var oldGoodsDealList = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
+		var idx = oldGoodsDealList.length+1; 
+		
+		var isExist = false;
+		goodsData.forEach(function(goods){
+			isExist = false;
+
+			gridGoodsComposeOptions.api.forEachNode(function(rowNode, index) {
+
+				if (goods.goodsCd == rowNode.data.extendGoodsCd){
+					isExist = true;
+				}
+			});
+			
+			if (goods.goodsType != 'N'){
+				isExist = true;
+			}
+			if(!isExist){
+				
+				var data = { 
+						  goodsCd : $('#goodsDetailForm input[name=goodsCd]').val()
+						, extendGoodsCd: goods.goodsCd
+						, goodsType: $('#goodsDetailForm input[name=goodsType]').val()
+						, dispOrd: idx
+						, qty: 1
+						, compsCurrPrice: goods.currPrice
+						, extendStaffCurrPrice: goods.currPrice
+						, baseYn: 'N'
+						, goodsStat : goods.goodsStat
+						, useYn: 'Y'
+						, extendGoodsOptNm : goods.goodsNm
+						, extendGoodsCdNm : goods.goodsNm
+						, currPrice : goods.currPrice
+						, selfGoodsYn : goods.selfGoodsYn
+						, imgType : goods.imgType
+						, imgPath1 : goods.imgPath1
+						, imgPath6 : goods.imgPath6
+						};
+				gridGoodsComposeOptions.api.updateRowData({add: [data], addIndex: idx});
+				
+				idx++;
+				$('#goodsDetailForm').find('.tabs .tabsNav li:eq(5) a').attr("style", "color:red;");
+			}
+		});
+		gridGoodsComposeOptions.api.refreshCells();
+	}
+	
+	//엑셀 상품 조회
+	$('#btnGoodsDealSearchExcel').on('click', function() {
+		cfnExcelUploadPopup('goodsDetailExcelUpload', 'goodsDetailExcelUpload');
+	});
+
+	var goodsDetailExcelUpload = function(result){
+		var data = {procJob : result.procJob
+			,excelFileNm : result.excelFileNm
+		};
+		var jsonData = JSON.stringify(data);
+		gagajf.ajaxJsonSubmit('/goods/search/excelupload/save', jsonData, goodsDetailExcelUploadCallBack);
+	}
+
+	var goodsDetailExcelUploadCallBack = function(result){
+		gagajf.ajaxJsonSubmit('/goods/excel/upload/goods/list', '', fnGoodsDetailSearchExcel);
+	}
+	
+	var fnGoodsDetailSearchExcel = function(result){
+		fnGoodsDetailGoodsDeal(result.goodsExcelList);
+	}
+		
+	$("img").on("error", function () {
+		$(this).attr("src",  _uximgUrl+"/image/no.gif");
+	});
+	
+	$(document).ready(function() {
+
+		gagaAgGrid.createGrid('gridGoodsHstoryList', gridGoodsHstoryOptions);
+		gagaAgGrid.createGrid('gridGoodsComposeList', gridGoodsComposeOptions);
+
+		fnGoodsDeailSearch();
+		
+	});
+	
+/*]]>*/
+</script>
+</html>

+ 626 - 0
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsDetailImageForm.html

@@ -0,0 +1,626 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : GoodsDetailImageForm.html
+ * @desc    : 상품 이미지 보기 화면(상품 이미지 정보(열))
+ *============================================================================
+ * SISUN
+ * Copyright(C) 2019 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2019.12.27   eskim       최초 작성
+ * 2.0  2020.06.09   eskim       수정
+ *******************************************************************************
+ -->
+	<div class="modalPopup" >
+		<!-- PANELSTYLE -->
+			<div class="panelStyle">
+				<!-- TITLE -->
+				<div class="panelTitle">
+					<h2>상품 이미지 수정</h2>
+					<button type="button" class="close" onclick="fnGoodsImgFormClose()"><i class="fa fa-times"></i></button>
+				</div>
+				<!-- //TITLE -->
+				<!-- CONTENT -->
+				<div class="panelContent">
+
+					<ul class="notice">
+						<li>[업로드/수정] 버튼 클릭 하면 프론트에 바로 적용되므로 최종 확인 후 전송을 권장합니다.</li>
+						<li>이미지 미리보기 리스트는 <em>업로드 후</em> 확인 할 수 있습니다.</li>
+						<li>이미지보기 버튼은 이미지 파일 <em>등록 후</em> 확인 할 수 있습니다. 이미 <em>업로드 된</em> 파일은 확인 할 수 없습니다.(파일 크기 옆 화살표로 구분 가능합니다.)</li>
+					</ul>
+
+					<table class="frmStyle">
+						<colgroup>
+							<col width="100px"/>
+							<col/>
+							<col width="100px"/>
+							<col/>
+							<col width="100px"/>
+							<col/>
+						</colgroup>
+						<tr>
+							<th>컬러명</th>
+							<td>PINK</td>
+							<td colspan="4"></td>
+							<!-- <th>대표 이미지순번</th>
+							<td><input type="text" value="1"/></td>
+							<th>마우스오버 이미지순번</th>
+							<td><input type="text" value="2"/></td> -->
+						</tr>
+						<tr>
+							<th>이미지등록</th>
+							<td class="dexterArea">
+
+								<!-- 덱스터 테이블 영역 -->
+								<ul class="dexterTable">
+									<li class="dexterNo">
+										<!-- 덱스터 테이블 번호 -->
+										<div>1</div><div>2</div><div>3</div><div>4</div>
+										<!-- //덱스터 테이블 번호 -->
+									</li>
+									<li>
+									<!-- 덱스터 테이블 삽입 -->
+										덱스터 테이블 삽입<br/>공간은 테이블 넓이에 따라 자동으로 넓어집니다.<br/>
+										(최소 넓이 : 350px로 설정됨)<br/>
+									<!-- //덱스터 테이블 -->
+									<li>
+								</ul>
+								<!-- //덱스터 테이블 영역 -->
+
+							</td>
+							<td colspan="4" class="verticalTop">
+
+								<!-- 이미지 카드 영역 -->
+								<div class="cardArea">
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+									<!-- 이미지 카드 -->
+									<div class="imgCard">
+										<button type="button" class="cardClose">닫기</button>
+										<ul>
+											<li>
+												<img src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" widht="70" height="70">
+											</li>
+											<li>이미지1</li>
+										</ul>
+										<p>G2019052800040_023_4(170330).jpg</p>
+									</div>
+									<!-- //이미지 카드 -->
+								</div>
+								<!-- //이미지 카드 영역 -->
+
+							</td>
+						</tr>
+					</table>
+				</div>
+				<!-- 버튼 배치 영역 -->
+				<ul class="panelBar marT10">
+					<li class="center">
+						<button type="button" class="btn btn-base btn-lg">파일 추가</button>
+						<button type="button" class="btn btn-default btn-lg">선택 삭제</button>
+						<button type="button" class="btn btn-default btn-lg">전체 삭제</button>
+						<button type="button" class="btn btn-info btn-lg">뒤로 이동</button>
+						<button type="button" class="btn btn-info btn-lg">아래로 이동</button>
+						<button type="button" class="btn btn-base btn-lg">이미지 보기</button>
+						<button type="button" class="btn btn-base btn-lg">업로드/수정</button>
+						<button type="button" class="btn btn-base btn-lg">저장하기</button>
+					</li>
+				</ul>
+				<!-- //버튼 배치 영역 -->
+			</div>
+
+		<!-- <div class="panelStyle">
+			<div class="panelTitle">
+				<strong>상품 이미지 보기&nbsp;<button type="button" class="btn icn" onclick="fnOpenCommentPopup('comment')" ><i class="fa fa-cog" aria-hidden="true"></i></button></strong>
+				<button type="button" class="close" onclick="fnGoodsImgFormClose()"><i class="fa fa-times"></i></button>
+			</div>
+			<div class="panelContent">
+			<form id="goodsImgForm" name="goodsImgForm" th:method="post">
+			<input type="hidden" id="goodsCd" name="goodsCd" th:value="${params.goodsCd}"/>
+				<table class="frmStyle" th:with="uploadGoodsUrl=${@environment.getProperty('upload.goods.view')},uxImgUrl=${@environment.getProperty('domain.uximage')}">
+					<colgroup>
+						<col width="75%"/>
+						<col width="25%"/>
+					</colgroup>
+					<tbody id="goodsImgList">
+						<tr>
+							<th class="aL vaT">imgPath1 : <th:block th:utext="${'필수: 상품코드_01.jpg<i class=star></i>'}"></th:block>
+								<hr/>
+								<input type="text" class="w100p" id="imgPath1" name="imgPath1" />
+							</th>
+							<td>
+								<img  src="http://image.istyle24.com/Upload/ProductImage/0000004766/20200826/14505664_L.jpg?RS=560" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/image/no.gif'}+'\';'" width="200px"/>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+			</form>
+			</div>
+			<ul class="panelBar">
+				<th:block th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">
+				<button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsDetailImgSave">저장</button>
+				</th:block>
+			</ul>
+		</div> -->
+	</div>
+<script th:inline="javascript">
+/*<![CDATA[*/
+	var fileExtension = [[${@environment.getProperty('upload.goods.allow.extension')}]];
+
+	//상품이미지 저정버튼 클릭 시
+	$('#btnGoodsDetailImgSave').click(function(e) {
+		if ($("#goodsImgForm").find("#goodsImgList tr").length == 0){
+			/* mcxDialog.alert('', function(){
+
+			});
+			return false; */
+		}
+		var optCheck = false;
+		var imgType = $('#goodsImgForm input[name=imgType]').val();
+		
+		$("#goodsImgForm").find("#goodsImgList tr").each(function() {
+			var size = 30;
+
+			for(i=0;i<size;i++){
+				var imgVal = $("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1) +"]").val();
+				
+				if(!gagajf.isNull(imgVal)){
+					var reg = "\.("+fileExtension+")$";
+					if(!(new RegExp(reg, "i")).test(imgVal)) {
+						optCheck = true;
+						mcxDialog.alertC('이미지는 ['+ fileExtension + '] 파일만 가능합니다.', {
+							sureBtnText: "확인",
+							sureBtnClick: function() {
+								$("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
+							}
+						});
+						return false;
+					}
+
+					if (imgVal.indexOf('\\"') > -1){
+							optCheck = true;
+							mcxDialog.alertC('["]는 입력할 수 없습니다.', {
+								sureBtnText: "확인",
+								sureBtnClick: function() {
+									$("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
+								}
+							});
+							return false;
+					}
+					if (imgVal.indexOf("\\'") > -1){
+							optCheck = true;
+							mcxDialog.alertC("[\\']는 입력할 수 없습니다.", {
+								sureBtnText: "확인",
+								sureBtnClick: function() {
+									$("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
+								}
+
+							});
+							return false;
+					}
+					if (imgType == "A"){
+						if (imgVal.indexOf("http") > -1){
+							optCheck = true;
+							mcxDialog.alertC("이미지 도메인은 입력할 수 없습니다.", {
+								sureBtnText: "확인",
+								sureBtnClick: function() {
+									$("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
+								}
+
+							});
+							return false;
+						}
+					}else{
+						if (imgVal.indexOf("https") <= -1){
+							optCheck = true;
+							mcxDialog.alertC("이미지 도메인을 입력해 주세요.", {
+								sureBtnText: "확인",
+								sureBtnClick: function() {
+									$("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
+								}
+
+							});
+							return false;
+						}
+					}
+				}else{
+					if(i == 0){
+						optCheck = true;
+						mcxDialog.alertC("필수 상품이미지 입니다.", {
+							sureBtnText: "확인",
+							sureBtnClick: function() {
+								$("#goodsImgForm").find("#goodsImgList tr").find("input[name=imgPath"+ (i+1)+"]").focus();
+							}
+
+						});
+						return false;
+					}
+				}
+			}
+		});
+
+		if(optCheck) {
+			return false;
+		}
+
+		mcxDialog.confirm('저장하시겠습니까?', {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function(){
+				gagajf.ajaxFormSubmit("/goods/img/save", "#goodsImgForm", fnGoodsImgFormClose);
+			}
+		});
+	});
+
+	//창종료
+	var fnGoodsImgFormClose = function(){
+		uifnPopupClose('popupGoodsImage');
+	}
+
+	//안내팝업
+	var fnOpenCommentPopup = function(id) {
+		var str = '<div class="popupWrap" id="'+id+'" style="z-index:30">';
+		str = str + '<div class="popup modeless ui-widget-content ui-draggable ui-draggable-handle" style="display: block;  position: relative;">';
+		str = str + '<button type="button" class="close" onclick="uifnPopClose(\''+id+'\')"><i class="fa fa-times"></i></button>';
+		str = str + '<div class="mdPopContent">';
+		str = str + '<ul class="notice ">';
+		str = str + '<em><b>* 이미지 타입</b></em>';
+		str = str + '<li> <b>A</b> : <b>자사전용</b>(이미지 도메인명 없음)</li>';
+		str = str + '  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ex) /P/PQS/PQS11TM24M_BU/1000/PQS11TM24M_BU_01.jpg';
+		str = str + '<li> <b>B</b> : <b>입점전용</b>(https를 포함한 이미지 전체 경로)</li>';
+		str = str + '  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ex) <em>https:</em>//pastel.jpg2.kr/goods/LCCAJ334_IV_1.jpg';
+		str = str + '<li><b>IMG_PATH1 (<em>필수</em>)</b> : 상품코드_<b>01.jpg</li>';
+		str = str + '<li><b>IMG_PATH2 ~ IMG_PATH5</b> (선택) : 상품코드_<b>02</b>.jpg ~ 상품코드_<b>05</b>.jpg</li>';
+		str = str + '<li><b>IMG_PATH6 ~ IMG_PATH10</b> (선택, 화보컷) : 상품코드_<b>M1</b>.jpg ~ 상품코드_<b>M5</b>.jpg</li>';
+		str = str + '<li><b>IMG_PATH11 ~ IMG_PATH25</b> (선택, 상세컷) : 상품코드_<b>D1</b>.jpg ~ 상품코드_<b>D15</b>.jpg</li>';
+		str = str + '<li><b>IMG_PATH26 ~ IMG_PATH27</b> (선택, 라벨컷) : 상품코드_<b>R1</b>.jpg ~ 상품코드_<b>R2</b>.jpg</li>';
+		str = str + '<li><b>IMG_PATH28 ~ IMG_PATH30</b> (선택, 기타컷) : 상품코드_<b>E1</b>.jpg ~ 상품코드_<b>E3</b>.jpg</li>';
+		str = str + '</ul>';
+		str = str + '</div></div></div>';
+
+		if ($('#'+ id).length == 0) {
+			$('body').append(str);
+		}
+		$("#"+id).css({display:"block"});
+	}
+/*]]>*/
+</script>
+</html>

+ 155 - 0
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsDetailSizeStockForm.html

@@ -0,0 +1,155 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : GoodsSizeStockForm.html
+ * @desc    : 상품 옵셥/재고 화면
+ *============================================================================
+ * SISUN
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2020.10.26   eskim       수정
+ *******************************************************************************
+ -->
+	<table class="frmStyle" th:with="uploadGoodsUrl=${@environment.getProperty('upload.goods.view')},uxImgUrl=${@environment.getProperty('domain.uximage')}">
+		<colgroup>
+			<col width="100px"/>
+			<col width="100px"/>
+			<col width="10%"/>
+			<col width="100px"/>
+			<col width="100px"/>
+			<col/>
+		</colgroup>
+		<tr>
+			<th>번호</th>
+			<th>대표색상</th>
+			<th>이미지</th>
+			<th>색상코드</th>
+			<th>색상</th>
+			<th>이미지관리</th>
+		</tr>
+		<tbody id="colorList" >
+		<th:block  th:if="${goodsColorList}" th:each="goodsColor, sizeStatus : ${goodsColorList}">
+		<tr>
+			<td class="aC" th:text="${sizeStatus.count}">1</td>
+			<td class="aC"><label class="rdoBtn"><input type="radio" name="basicColor" th:value="${goodsColor.optCd1}"  th:checked="${goodsColor.mainColorYn =='Y'}" /></label></td>
+			<td class="aC">
+				<th:block th:if="${goodsColor.imgType == 'G030_A'}">
+					<img width="60" th:if="${goodsColor.imgPath6}" th:src="${goodsColor.imgPath6}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/image/no.gif'}+'\';'" alt="">
+					<img width="60" th:unless="${goodsColor.imgPath6}" th:src="${goodsColor.imgPath1}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/image/no.gif'}+'\';'" alt="">
+				</th:block>
+				<th:block th:unless="${goodsColor.imgType == 'G030_A'}">
+					<img width="60" th:if="${goodsColor.imgPath6}" th:src="${uploadGoodsUrl+goodsColor.imgPath6}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/image/no.gif'}+'\';'" alt="">
+					<img width="60" th:unless="${goodsColor.imgPath6}" th:src="${uploadGoodsUrl+goodsColor.imgPath1}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/image/no.gif'}+'\';'" alt="">
+				</th:block>
+			</td>	
+			<td class="aC" th:text="${goodsColor.optCd1}">BK</td>
+			<td class="aC" th:text="${goodsColor.colorEnm}">BLACK</td>
+			<td><button type="button" class="btn btn-base btn-lg" th:onclick="fnGoodsDetailImg([[${goodsColor.optCd1}]])" th:text="${#strings.isEmpty(goodsColor.imgPath1) ?'등록':'수정'}">등록</button></td>
+		</tr>
+		</th:block>
+		</tbody>
+	</table>
+
+	<table class="frmStyle">
+		<colgroup>
+			<col width="10%"/>
+			<col width="15%"/>
+			<col/>
+			<col width="10%"/>
+			<col width="7%"/>
+			<col width="7%"/>
+			<col width="7%"/>
+			<col width="7%"/>
+			<col width="7%"/>
+			<col width="7%"/>
+			<col width="7%"/>
+		</colgroup>
+		<tr th:if="${goods.selfGoodsYn == 'Y' and goods.goodsType == 'G056_N'}">
+			<th colspan="2">ERP재고연동여부<i class="star"></i></th>
+			<td colspan="2">
+				<label class="rdoBtn"><input type="radio" name="erpStockLinkYn" id="erpStockLinkYnY" value="Y" th:checked="${goods.erpStockLinkYn == 'Y'}"/>Y</label>
+				<label class="rdoBtn"><input type="radio" name="erpStockLinkYn" id="erpStockLinkYnN" value="N" th:checked="${goods.erpStockLinkYn == 'N'}"/>N</label>
+				<input type="hidden" id="erpStockLinkYnOrg" name="erpStockLinkYnOrg" th:value="${goods.erpStockLinkYn}"/>
+			</td>
+			<td colspan="7"></td>
+		</tr>
+		<th:block th:if="${goods.selfGoodsYn == 'N' or goods.goodsType != 'G056_N'}">
+			<input type="hidden" id="erpStockLinkYnOrg" name="erpStockLinkYnOrg" th:value="${goods.erpStockLinkYn}"/>
+			<input type="hidden" id="erpStockLinkYn" name="erpStockLinkYn"  th:value="${goods.erpStockLinkYn}"/>
+		</th:block>
+		<tr>
+			<th>상품코드</th>
+			<th>옵션1(색상)</th>
+			<th>옵션2(사이즈)</th>
+			<th>추가가격</th>
+			<th>노출순서</th>
+			<th>노출여부</th>
+			<th>가용재고</th>
+			<th>안전재고</th>
+			<th>출고대기</th>
+			<th>판매가능재고</th>
+			<th>품절여부</th>
+		</tr>
+		<tbody id="optionList" >
+		<th:block  th:if="${goodsSizeList}" th:each="goodsSize, sizeStatus : ${goodsSizeList}">
+		<tr>
+			<td th:rowspan="${goodsSize.rcount}" th:text="${goodsSize.compsGoodsCd}" th:if="${goodsSize.rnum == 1}"></td>
+			<td><th:block th:text="${goodsSize.optCd1}"></th:block>
+				<input type="hidden" name="compsGoodsCd" th:value="${goodsSize.compsGoodsCd}" />
+				<input type="hidden" name="optCd" th:value="${goodsSize.optCd}" />
+				<input type="hidden" name="optCd1" th:value="${goodsSize.optCd1}" />
+			</td>
+			<td><th:block th:text="${goodsSize.optCd2}"></th:block>
+				<input type="hidden" name="optCd2" th:value="${goodsSize.optCd2}" />
+			</td>
+			<td><input type="text" class="w100p aR" name="addPrice" th:value="${goodsSize.addPrice}"  maxlength="7"  data-valid-type="numeric"/>
+				<input type="hidden" name="hidAddPrice" th:value="${goodsSize.addPrice}" />
+			</td>
+			<td><input type="text" class="w100p aC" name="dispOrd" th:value="${goodsSize.dispOrd}"  maxlength="7" data-valid-type="integer"/>
+				<input type="hidden" name="hidDispOrd" th:value="${goodsSize.dispOrd}" />
+			</td>
+			<td><select name="dispYn" class="w100p aC">
+					<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}" th:selected="${goodsSize.dispYn == oneData.cd}"></option>
+				</select>
+				<input type="hidden" name="hidDispYn" th:value="${goodsSize.dispYn}"/>
+			</td>
+			<td><input type="text" class="w100p aC" name="editCurrStockQty" th:value="${goodsSize.currStockQty}" maxlength="10" data-valid-type="numeric" th:disabled="${goods.selfGoodsYn == 'Y'}"/>
+				<input type="hidden" name="currStockQty" th:value="${goodsSize.currStockQty}"/>
+			</td>
+			<td><input type="text" class="w100p aC"  name=baseStockQty th:value="${goodsSize.baseStockQty}" maxlength="7" data-valid-type="integer">
+				<input type="hidden" name="hidBaseStockQty" th:value="${goodsSize.baseStockQty}"/>
+			</td>
+			<td><input type="text" class="w100p aC" name="saleStockQty" th:value="${goodsSize.saleStockQty}" maxlength="17" data-valid-type="numeric" th:disabled="disabled"/>
+			</td>
+			<td><input type="text" class="w100p aC"  name="ableStockQty" maxlength="7" data-valid-type="numeric" th:disabled="disabled" th:value="${goodsSize.ableStockQty}" /></td>
+			<td><select name="soldoutYn" class="w100p aC" >
+					<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}" th:selected="${goodsSize.soldoutYn == oneData.cd}"></option>
+				</select>
+				<input type="hidden" name="hidSoldoutYn" th:value="${goodsSize.soldoutYn}"/>
+			</td>	
+		</tr>
+		</th:block>
+	</table>
+<script th:inline="javascript">
+/*<![CDATA[*/
+	
+	var fnGoodsDetailImg = function(colorCd){
+		cfnOpenGoodsImagePopup($('#goodsDetailForm input[name=goodsCd]').val());
+	}
+	
+	$(document).ready(function() {
+		
+		//옵션/재곡 변경여부
+		$('#goodsDetailForm').find('#goodstab2').find("input, select, textarea").on('change', function() {
+			$('#goodsDetailForm').find('.tabs .tabsNav li:eq(1) a').attr("style", "color:red;");
+		});
+		
+	});
+	
+/*]]>*/
+</script>
+</html>

+ 1009 - 0
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsListForm.html

@@ -0,0 +1,1009 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : GoodsListForm.html
+ * @desc    : 상품목록 Page
+ *============================================================================
+ * SISUN
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2020.10.19   eskim       최초 작성
+ *******************************************************************************
+ -->
+	<div id="main">
+		<!-- 메인타이틀 영역 -->
+		<div class="main-title">
+		</div>
+		<!-- //메인타이틀 영역 -->
+		
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<form id="searchForm" name="searchForm" action="#" th:action="@{'/goods/list'}">
+		<input type="hidden" id="searchGb" name="searchGb" />
+		<input type="hidden" id="imageViewYn" name="imageViewYn" />
+	 		<!-- 패널 영역1 -->
+		<div class="panelStyle" >
+			<!-- 검색조건 영역 -->
+			<!-- TITLE -->
+			<div class="panelTitle">
+				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 <font color="red">업체, 키워드, 발생일</font>중 하나를 꼭 입력해 주세요.</h3>
+				<span class="panelControl">
+					<i class="fa fa-chevron-up"></i>
+				</span>
+			</div>
+			<!-- //TITLE -->
+			<div class="panelContent">
+				<table class="frmStyle">
+					<colgroup>
+						<col style="width: 7%;"/>
+						<col/>
+						<col style="width: 7%;"/>
+						<col style="width: 16%;"/>
+						<col style="width: 7%;"/>
+						<col style="width: 18%;"/>
+						<col style="width: 7%;"/>
+						<col style="width: 16%;"/>
+					</colgroup>
+					<tr>
+						<th>업체/브랜드<em class="required" title="필수"></em></th>
+						<td colspan="3">
+							<label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnY" value="Y"  checked/>자사</label>
+							<label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnN" value="N"/>입점</label>
+							<select name="supplyCompCd" id="supplyCompCd">
+								<option value="" th:if="${sessionInfo.roleCd} != 'G001_B000'">[전체]</option>
+								<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+							<span id="multiBrand"></span>
+						</td>
+						<th>상품타입</th>
+						<td>
+							<select name="goodsType" id="goodsType">
+								<option value="">[전체]</option>
+								<option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th rowspan="4">키워드<em class="required" title="필수"></em></th>
+						<td rowspan="4">
+							<select name="search" id="search">
+								<option value="searchGoodsCd">상품코드</option>
+								<option value="searchGoodsNm">상품명</option>
+								<option value="searchGoodsNum">품번</option>
+								<option value="searchSupplyGoodsCd">업체상품코드</option>
+							</select>
+							<!-- <input type="text" class="w40p" name="condition" id="condition" maxlength="50"/> -->
+							<textarea class="textareaR3 w70p" name="condition" id="condition"></textarea>
+						</td>
+					</tr>
+					<tr>
+						<th>품목</th>
+						<td>
+							<div class="multiCheckBox"  style="width:300px">
+								<button type="button" class="sltBtn">[전체]</button>
+								<ul style="overflow:auto; height:170px;">
+									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiItemkindCd" onclick="uifnAllCheck('multiItemkindCd')">전체선택</label></li>
+									<li th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}"><label class="chkBox"><input type="checkbox" name="multiItemkindCd" th:id="${'itemkindCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
+							</div>
+						</td>
+						<th>상품상태</th>
+						<td>
+							<div class="multiCheckBox"  style="width:200px">
+								<button type="button" class="sltBtn">[전체]</button>
+								<ul style="overflow:auto; height:170px">
+									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiGoodsStat" onclick="uifnAllCheck('multiGoodsStat')">전체선택</label></li>
+									<li th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}"><label class="chkBox"><input type="checkbox" name="multiGoodsStat" th:id="${'goodsStat' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
+							</div>
+						</td>
+						<th>정상/이월 구분</th>
+						<td>
+							<select  name="formalGb" id="formalGb">
+								<option value="">[전체]</option>
+								<option th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>년도/시즌</th>
+						<td>
+							<!-- <select  name="styleYear" id="styleYear">
+								<option value="">[전체]</option>
+								<option th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+							<select  name="seasonCd" id="seasonCd">
+								<option value="">[전체]</option>
+								<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select> -->
+							<div class="multiCheckBox" style="width:140px;">
+								<button type="button" class="sltBtn">[전체]</button>
+								<ul style="overflow:auto; height:140px">
+									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiStyleYear" onclick="uifnAllCheck('multiStyleYear')">전체선택</label></li>
+									<li th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}"><label class="chkBox"><input type="checkbox" name="multiStyleYear" th:id="${'styleYear' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
+							</div>
+							<div class="multiCheckBox" style="width:170px;">
+								<button type="button" class="sltBtn">[전체]</button>
+								<ul style="overflow:auto; height:170px">
+									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiSeasonCd" onclick="uifnAllCheck('multiSeasonCd')">전체선택</label></li>
+									<li th:if="${seasonList}" th:each="oneData, status : ${seasonList}"><label class="chkBox"><input type="checkbox" name="multiSeasonCd" th:id="${'seasonCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
+							</div>		
+						</td>
+						<th>연령대</th>
+						<td>
+							<select  name="ageGrpCd" id="ageGrpCd">
+								<option value="">[전체]</option>
+								<option th:if="${ageGrpCdList}" th:each="oneData, status : ${ageGrpCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>성별</th>
+						<td>
+							<select  name="sexGb" id="sexGb">
+								<option value="">[전체]</option>
+								<option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>재고연동여부</th>
+						<td>
+							<select  name="erpStockLinkYn" id="erpStockLinkYn">
+								<option value="">[전체]</option>
+								<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>자사몰노출여부</th>
+						<td>
+							<select  name="selfMallYn" id="selfMallYn">
+								<option value="">[전체]</option>
+								<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>품절여부</th>
+						<td>
+							<select  name="soldOutYn" id="soldOutYn">
+								<option value="">[전체]</option>
+								<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>반품가능여부</th>
+						<td>
+							<select  name="returnableYn" id="returnableYn">
+								<option value="">[전체]</option>
+								<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+							<!-- <label class="chkBox"><input type="checkbox" name="returnableYn" value="Y"/>반품가능</label>
+							<label class="chkBox"><input type="checkbox" name="changeableYn" value="Y"/>교환가능</label>
+							<label class="chkBox"><input type="checkbox" name="returnFeeFreeYn" value="Y"/>무료반품</label>
+							<label class="chkBox"><input type="checkbox" name="changeFeeFreeYn" value="Y"/>무료교환</label> -->
+						</td>
+						<th>담당MD</th>
+						<td>
+							<select  name="mdId" id="mdId">
+								<option value="">[전체]</option>
+								<option th:if="${brandMdList}" th:each="oneData, status : ${brandMdList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>판매가</th>
+						<td>
+							<input type="text" class="w90 aR" name="currPriceSt" id="currPriceSt" maxlength="10" data-valid-type="numeric"/>원 ~ <input type="text" class="w90 aR" name="currPriceEd" id="currPriceEd" maxlength="10" data-valid-type="numeric"/>원
+						</td>
+						<th>할인율</th>
+						<td>
+							<input type="text" class="w70" name="dcRateSt" id="dcRateSt" maxlength="3" data-valid-type="numeric"/> % ~ <input type="text" class="w70" name="dcRateEd" id="dcRateEd" maxlength="3" data-valid-type="numeric"/> %
+						</td>
+					</tr>
+					<tr>
+						<th>발생일<em class="required" title="필수"></em></th>
+						<td colspan="7" id="sellTerms"></td>
+					</tr>
+				</table>
+				<ul class="panelBar">
+					<li class="center">
+						<button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button>
+						<button type="button" class="btn btn-info btn-lg" id="btnSearch" >조회</button>
+					</li>
+				</ul>
+			</div>
+			<!-- //검색조건 영역 -->
+		</div>
+		<!-- 패널 영역1 -->
+		<div class="panelStyle">
+			<!-- 검색결과 영역 -->
+			<!-- 상단버튼 영역  -->
+			<ul class="panelBar">
+				<li>
+					<button type="button" class="btn btn-default btn-lg" onclick="fnGoodsExcelDownLoad('');">엑셀다운로드</button>
+					<button type="button" class="btn btn-default btn-lg" onclick="fnGoodsExcelDownLoad('Y');">엑셀다운로드(이미지포함)</button>
+					<button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF013');">상품엑셀조회 양식 다운로드</button>
+					<button type="button" class="btn btn-base btn-lg" id="btnGoodsExcelUpLoad">엑셀조회</button>
+				</li>
+				<li class="right">
+					<button type="button" class="btn btn-primary btn-lg"  id="btnGoodsSetMake">세트상품구성</button>
+					<button type="button" class="btn btn-primary btn-lg" id="btnGoodsSetDeal">딜상품구성</button>
+					검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>&nbsp;
+					쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>&nbsp;&nbsp;
+					<select id="pageSize" name="pageSize">
+						<option value="50" selected="selected">50개씩 보기</option>
+						<option value="100">100개씩 보기</option>
+						<option value="500">500개씩 보기</option>
+						<option value="1000">1000개씩 보기</option>
+					</select>
+					<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
+				</li>
+			</ul>
+			<label class="off">
+				<a href="javascript:void(0);" id="GoodsExcelList" style="display: none;">상품목록 엑셀다운로드</a>
+			</label>
+			<!-- //상단버튼 영역  -->
+			<div id="gridList" style="width: 100%; height: 700px;" class="ag-theme-balham lh60"></div>
+			<ul class="panelBar">
+				<li class="center">
+					<div class="tablePaging" id="goodsListPagination"></div>
+				</li>
+			</ul>
+			<ul class="panelBar">
+				<li class="right">
+					<button type="button" class="btn btn-info btn-sm"  onclick="fnGoodsStatArea();" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">상태일괄적용</button>
+					<button type="button" class="btn btn-info btn-sm" onclick="fnGoodsStaSelfNotArea();" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">입점상태일괄적용</button>
+				</li>
+			</ul>
+			<ul class="boxContent off" id="goodsStatArea">
+				<li class="pad20">
+					<table class="frmStyle">
+						<colgroup>
+							<col style="width: 7%;"/>
+							<col style="width: 18%;"/>
+							<col style="width: 7%;"/>
+							<col style="width: 18%;"/>
+							<col style="width: 7%;"/>
+							<col style="width: 18%;"/>
+							<col style="width: 7%;"/>
+							<col/>
+						</colgroup>
+						<tr>
+							<th>상품상태</th>
+							<td>
+								<select  name="goodsStatC" id="goodsStatC">
+									<option value="">[선택]</option>
+									<option th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+								</select>
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('goodsStat')">적용</button>
+							</td>
+							<th>재고연동여부</th>
+							<td >
+								<select id="erpStockLinkYnC" name="erpStockLinkYnC">
+									<option value="">[선택]</option>
+									<option value="Y">연동</option>
+									<option value="N">비연동</option>
+								</select>
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('erpStockLinkYn')" >적용</button>
+							</td>
+							<th>정상/이월 구분</th>
+							<td>
+								<select  name="formalGbC" id="formalGbC">
+									<option value="">[선택]</option>
+									<option th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+								</select>
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('formalGb')" >적용</button>
+							</td>
+							<th>반품가능여부</th>
+							<td>
+								<select id="returnableYnC" name="returnableYnC">
+									<option value="">[선택]</option>
+									<option value="Y">가능</option>
+									<option value="N">불가</option>
+								</select>
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('returnableYn')" >적용</button>
+							</td>
+						</tr>
+						<tr>
+							<th>상품타이틀</th>
+							<td colspan="3">
+								<input id="goodsTnmC" name="goodsTnmC" type="text" class="w200" maxlength="70"/>
+								<label class="chkBox"><input type="checkbox" name="blankFlag" value="Y"/>BLANK 적용<span></span></label>
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('goodsTnm')" >적용</button>
+							</td>
+							<th>무료배송기준</th>
+							<td>
+								<input id="minOrdAmtC" name="minOrdAmtC" type="text" class="w100"  data-valid-type="numeric" maxlength="10"/>이상 구매시 무료
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('minOrdAmt')" >적용</button>
+							</td>
+							<th>ID당1일최대구매수량</th>
+							<td>
+								<input id="dayMaxOrdQtyC" name="dayMaxOrdQtyC" type="text" class="w100" data-valid-type="numeric" />
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('dayMaxOrdQty')" >적용</button>
+							</td>
+						</tr>
+						<tr>
+							<th>최소주문수량</th>
+							<td>
+								<input id="minOrdQtyC" name="minOrdQtyC" type="text" class="w100" data-valid-type="numeric" />
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('minOrdQty')" >적용</button>
+							</td>
+							<th>최대주문수량</th>
+							<td>
+								<input id="maxOrdQtyC" name="maxOrdQtyC" type="text" class="w100" data-valid-type="numeric" />
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('maxOrdQty')" >적용</button>
+							</td>
+							<th>PC포인트</th>
+							<td>
+								<input type="text" class="w100 aR" id="pntPrateC" name="pntPrateC" data-valid-type="numeric" maxlength="3"/> %
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('pntPrate')" >적용</button>
+							</td>
+							<th>모바일포인트</th>
+							<td>
+								<input type="text" class="w100 aR" id="pntMrateC" name="pntMrateC" data-valid-type="numeric" maxlength="3"/> %
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('pntMrate')" >적용</button>
+							</td>
+						</tr>
+						<tr>
+							<th>선물 주문가능</th>
+							<td>
+								<select id="giftPackYnC" name="giftPackYnC">
+									<option value="">[선택]</option>
+									<option value="Y">가능</option>
+									<option value="N">불가</option>
+								</select>
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsState('giftPackYn')" >적용</button>
+							</td>
+							<td colspan="6"></td>
+						</tr>
+					</table>
+				</li>
+			</ul>
+			<ul class="boxContent off" id="goodsStatSelfNoArea">
+				<li class="pad20">
+					<table class="frmStyle">
+						<colgroup>
+							<col width="7%"/>
+							<col/>
+						</colgroup>
+						<tr>
+							<th>상품상태</th>
+							<td>
+								<select  name="goodsStatNC" id="goodsStatNC">
+									<option value="">[선택]</option>
+									<option th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+								</select>
+								<button type="button" class="btn btn-dark btn-sm" onclick="fnChangeGoodsStateSelfNo('goodsStat')">적용</button>
+							</td>
+						</tr>
+					</table>
+				</li>
+			</ul>
+			<!-- 검색결과 영역 -->
+		</div>
+		</form>
+		<!-- //패널 영역2 -->
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js?v=2019072202"></script>
+<script th:inline="javascript">
+/*<![CDATA[*/
+	var sessRoleCd = [[${sessionInfo.roleCd}]];
+	var goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
+	var formalGbList = gagajf.convertToArray([[${formalGbList}]]);
+	var seasonList = gagajf.convertToArray([[${seasonList}]]);
+	var uploadGoodsUrl = [[${@environment.getProperty('upload.goods.view')}]];
+	var columnDefs = [];
+	columnDefs = [
+		{width: 40, minWidth: 40, cellClass: 'text-right', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+		{headerName: 'No', width: 60, cellClass: 'text-center',
+			valueGetter: function(params) { return cfnGridNumner('searchForm',params.node.rowIndex, 'A');}
+		},
+		{headerName: "이미지", field: "imgPath1", width: 100, height: 60, cellClass: 'text-center'
+			,cellRenderer: function(params) {
+				if (params.data.imgType == "G030_A"){
+					if (gagajf.isNull(params.value)) {
+						return '<img width="60" src="'+ params.data.imgPath6 + '" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ params.data.imgPath6 +'\')" onerror="this.src=\'/image/no.gif\';"/>';
+					} else {
+						return '<img width="60" src="'+ params.value + '" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ params.value +'\')" onerror="this.src=\'/image/no.gif\';"/>';
+					}
+					
+				}else{
+					if(!gagajf.isNull(params.data.imgPath6)){
+						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6 + '" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ uploadGoodsUrl+params.data.imgPath6 +'\')" onerror="this.src=\'/image/no.gif\';"/>';
+					}else{
+						return '<img width="60" src="'+ uploadGoodsUrl+params.value + '" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ uploadGoodsUrl+params.value +'\')" onerror="this.src=\'/image/no.gif\';"/>';
+					}	
+				}
+			}
+		},
+		{headerName: "브랜드", field: "brandCd", width: 80, cellClass: 'text-center'},
+		{headerName: "브랜드명", field: "brandEnm", width: 130, cellClass: 'text-center'},
+		{headerName: "상품코드", field: "goodsCd", width: 140, cellClass: 'text-center'},
+		{headerName: "상품명", field: "goodsNm", width: 200, cellClass: 'text-left'
+			,cellRenderer: function(params) {
+				return '<a href="javascript:void(0);">' + params.value + '</a>';
+			}
+		},
+		{headerName: "품목", field: "itemkindNm", width: 150, cellClass: 'text-center'},
+		{headerName: "판매가능재고", field: "stockQtySum", width: 120, cellClass: 'text-right',
+			valueFormatter: function(params) {	return params.value.addComma();},
+			cellStyle : function(params){
+				if ("00" == params.data.goodsStat  || "10" == params.data.goodsStat || "20" == params.data.goodsStat || "30" == params.data.goodsStat) {
+					return;
+				}
+				var color = "";
+				if (params.value <= 0){
+					color = '#ff96689c';
+				}
+				return { 'background-color': color};
+			} 
+		},
+		{headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
+		},
+		{headerName: "년도", field: "styleYear" , width: 80, cellClass: 'text-center'},
+		{headerName: "시즌", field: "seasonCd" , width: 80, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(seasonList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(seasonList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(seasonList, params.newValue); }
+		},
+		{headerName: "정상가", field: "listPrice" , width: 100, cellClass: 'text-right'
+			,valueFormatter: function(params) {return params.value.addComma();},
+			cellEditor: 'textCellEditor',
+			cellEditorParams: { maxlength: 14, validType: 'numeric'}
+		},
+		{headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
+			,valueFormatter: function(params) {return params.value.addComma();},
+			cellEditor: 'textCellEditor',
+			cellEditorParams: { maxlength: 14, validType: 'numeric'}
+		},
+		{headerName: "할인율", field: "dcRate" , width: 90, cellClass: 'text-right'},
+		{headerName: "가격변경일", field: "priceUpdDt", width: 150, cellClass: 'text-center',
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "ERP재고연동여부", field: "erpStockLinkYn", width: 120, cellClass: 'text-center'},
+		{headerName: "이월구분", field: "formalGb", width: 100, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(formalGbList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(formalGbList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(formalGbList, params.newValue); }
+		},
+		{headerName: "반품가능", field: "returnableYn" , width: 90, cellClass: 'text-center'},
+		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center',
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "등록자", field: "regNm" , width: 100, cellClass: 'text-center'},
+		{headerName: "수정일시", field: "updDt", width: 150, cellClass: 'text-center',
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "수정자", field: "updNm" , width: 100, cellClass: 'text-center'}
+	];
+
+	// Get GridOptions
+	var gridOptions = gagaAgGrid.getGridOptions(columnDefs);
+
+	// 중복 선택 가능
+	gridOptions.rowSelection = 'multiple';
+ 	gridOptions.suppressRowClickSelection = true;
+	gridOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
+
+	// Row Click
+	gridOptions.onCellClicked = function(event) {
+		var goodsCd = event.data.goodsCd;
+		if (event.colDef.field == "goodsNm"){
+			cfnOpenGoodsDetailPopup('U',goodsCd);
+		}else if (event.colDef.field == "goodsCd"){
+
+			//cfnOpenFrontGoodsPopup(goodsCd, event.data.siteCd);
+		}
+	}
+
+	gridOptions.getRowStyle = function(params) {
+		if ("G008_00" == params.data.goodsStat  || "G008_10" == params.data.goodsStat || "G008_20" == params.data.goodsStat || "G008_30" == params.data.goodsStat) {
+			return { background: '#23c6c8' };
+		}
+	}
+
+	// 초기화 클릭시
+	$('#btnInit').on('click', function() {
+
+		$('#searchForm')[0].reset();
+		//$("#searchForm input[type=radio]").removeClass("checked");
+		$("#searchForm input[type=checkbox]").removeClass("checked");
+		//$("#searchForm input[type=radio]").parent("label").removeClass("checked");
+		$("#searchForm input[type=checkbox]").parent("label").removeClass("checked");
+		$("#searchForm input[type=radio][checked]").parent("label").addClass("checked");
+		$("#multiBrand").empty();
+	});
+
+	// 조회클릭시
+	$('#btnSearch').on('click', function() {
+		$("#searchForm input[name=pageNo]").val('1');
+		fnGoodsListSearch('BASIC');
+	});
+
+	// 조회
+	var fnGoodsListSearch = function(gbn) {
+
+		if (typeof(gbn) != 'undefined' &&  gbn == 'EXCEL'){
+			$("#searchForm input[name=searchGb]").val("EXCEL");
+		}else{
+			$("#searchForm input[name=searchGb]").val("BASIC");
+		}
+
+		if(!fnConditionCheck()) return;
+
+		gagaPaging.init('searchForm', fnSearchCallBack, 'goodsListPagination', $('#searchForm').find('#pageSize').val());
+		gagaPaging.load($("#searchForm input[name=pageNo]").val());
+	}
+
+	//검색 조건 확인
+	var fnConditionCheck = function(){
+		var formId = '#searchForm';
+		var form = document.searchForm;
+
+		if($("#searchForm input[name=searchGb]").val() == "EXCEL") return true;
+
+		var searchFlag = false;
+		var cnt = 0;
+
+		if( !gagajf.isNull($("#searchForm select[name=supplyCompCd]").val())
+				|| !gagajf.isNull($("#searchForm textarea[name=condition]").val())
+				|| (!gagajf.isNull($("#searchForm input[name=stDate]").val()) && !gagajf.isNull($("#searchForm input[name=edDate]").val()))
+				|| !gagajf.isNull($("#searchForm select[name=brandGrpNm]").val())
+			){
+			searchFlag = true;
+		}else{
+			/* for (i = 0; i < form.elements.length; i++ ) {
+				var el = form.elements[i];
+
+				if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "pageSize")) {
+					if (!(el.value == null || el.value == "")) {
+						cnt++;
+					}
+				}
+			}
+
+			if(cnt > 0) searchFlag = true; */
+		}
+
+		if(searchFlag == false){
+			mcxDialog.alert("검색조건을 입력하세요.");
+			return false;
+		}
+
+		if(!gagajf.isNull($("#searchForm input[name=currPriceSt]").val()) && !gagajf.isNull($("#searchForm input[name=currPriceEd]").val())){
+			if (Number($("#searchForm input[name=currPriceSt]").val().removeComma()) > Number($("#searchForm input[name=currPriceEd]").val().removeComma()) ){
+				mcxDialog.alertC("판매가를 확인해 주세요.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$("#searchForm input[name=currPriceEd]").focus();
+					}
+				});
+				return false;
+			}
+		}
+
+		if(!gagajf.isNull($("#searchForm input[name=dcRateSt]").val()) && !gagajf.isNull($("#searchForm input[name=dcRateEd]").val())){
+			if (Number($("#searchForm input[name=dcRateSt]").val().removeComma()) > Number($("#searchForm input[name=dcRateEd]").val().removeComma()) ){
+				mcxDialog.alertC("할인율를 확인해 주세요.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$("#searchForm input[name=dcRateEd]").focus();
+					}
+				});
+				return false;
+			}
+		}
+
+		var fromDate = $('#searchForm input[name=stDate]').val();
+		var toDate = $('#searchForm input[name=edDate]').val();
+
+		if (!gagajf.isNull(fromDate) || !gagajf.isNull(toDate)) {
+
+			if (gagajf.isNull(fromDate) || gagajf.isNull(toDate)) {
+				mcxDialog.alertC("등록일 조회시 시작일자와 종료일자를 입력하세요.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$('#searchForm input[name=stDate]').focus();
+					}
+				});
+				return false;
+			}
+
+			if (fromDate > toDate) {
+				mcxDialog.alertC("등록 시작일자는 종료일자 보다 클 수 없습니다.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$('#searchForm input[name=stDate]').focus();
+					}
+				});
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+	var fnSearchCallBack = function(result){
+
+		$('#searchForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+		$('#searchForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
+		$('#searchForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+		$('#searchForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+		gridOptions.api.setRowData(result.goodsList);
+		gagaPaging.createPagination(result.pageing.pageable);
+		
+	}
+
+	//페이징
+	$('#searchForm select[name=pageSize]').on('change', function() {
+		$("#searchForm input[name=pageNo]").val('1');
+		fnGoodsListSearch($("#searchForm input[name=searchGb]").val());
+	});
+
+	//업체변경시
+	$('#searchForm select[name=supplyCompCd]').on('change', function() {
+		var actionUrl = '/renderer/supplyCompany/brand/list/' + $(this).val();
+
+		if(sessRoleCd == "G001_B000"){
+			actionUrl = '/renderer/brand/AuthBrandlist';
+		}
+		
+		//$("#searchForm select[name=brandCd] option:gt(0)").remove();
+		//cfnCreateCombo(actionUrl, $('#searchForm select[name=brandCd]'), "[전체]", brandCd);
+		cfnCreateMultiCombo(actionUrl,"multiBrand",  "[전체]",null, 'Y');
+	});
+
+	//엑셀다운로드
+	var fnGoodsExcelDownLoad = function(flag){
+		var formId = '#searchForm';
+		if (gridOptions.api.getDisplayedRowCount() <= 0){
+			mcxDialog.alert("조회된 데이터가 없습니다.<br/>다시 조회 후 다운로드 받으세요.");
+			return;
+		}
+		$("#searchForm input[name=imageViewYn]").val(flag);
+
+		var params =  $(formId).serialize();
+		$('#GoodsExcelList').attr({ href : '/goods/info/excel/list?' + params }).get(0).click();
+	}
+
+	//엑셀 상품 조회
+	$('#btnGoodsExcelUpLoad').on('click', function() {
+		cfnExcelUploadPopup('goodsExcelUpload', 'goodsExcelUpload');
+	});
+
+	var goodsExcelUpload = function(result){
+		var data = {procJob : result.procJob
+					,excelFileNm : result.excelFileNm
+					};
+		var jsonData = JSON.stringify(data);
+		gagajf.ajaxJsonSubmit('/goods/search/excelupload/save', jsonData, fnGoodsExcelUploadCallBack);
+	}
+
+	var fnGoodsExcelUploadCallBack = function(result){
+		fnGoodsListSearch("EXCEL");
+	}
+
+	//상품상태 변경시
+	var fnChangeGoodsState = function(proc){
+
+		var objId = '#'+proc+"C";
+		if (proc == "goodsTnm"){
+			if(gagajf.isNull($(objId).val()) && !$("#searchForm input:checkbox[name=blankFlag]").is(':checked')){
+				mcxDialog.alertC('적용하실 항목을 선택해주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$(objId).focus();
+					}
+				});
+				return;
+			}else if(!gagajf.isNull($(objId).val()) && $("#searchForm input:checkbox[name=blankFlag]").is(':checked')){
+				mcxDialog.alertC('적용하실 항목을 하나만 선택해주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$(objId).focus();	
+					}
+				});
+				return;
+			}
+		}else{
+			if (gagajf.isNull($(objId).val())){
+				mcxDialog.alertC('적용하실 항목을 선택(입력)해주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$(objId).focus();
+					}
+				});
+				return;
+			}
+		}
+		var selectedData = gridOptions.api.getSelectedRows();
+
+		if (selectedData.length == 0) {
+			mcxDialog.alert('선택된 행이 없습니다.');
+			return;
+		}
+
+		var goodsStatVal  = '';
+		var erpStockLinkYnVal= '';
+		var formalGbVal= '';
+		var returnableYnVal= '';
+		var goodsTnmVal  = '';
+		var blankFlagVal = '';
+		var minOrdAmtVal = '';
+		var minOrdQtyVal = '';
+		var maxOrdQtyVal = '';
+		var dayMaxOrdQtyVal = '';
+		var pntPrateVal = '';
+		var pntMrateVal = '';
+		var giftPackYnVal = '';
+
+		if (proc == "goodsStat") {
+			goodsStatVal = $(objId).val();
+		}else if (proc == "erpStockLinkYn") {
+			erpStockLinkYnVal = $(objId).val();
+		}else if (proc == "formalGb") {
+			formalGbVal = $(objId).val();
+		}else if (proc == "returnableYn") {
+			returnableYnVal = $(objId).val();
+		}else if (proc == "goodsTnm"){
+			if($("#searchForm input:checkbox[name=blankFlag]").is(':checked')){
+				blankFlagVal = "Y";
+			}else{
+				goodsTnmVal = $(objId).val();
+			}
+		}else if (proc == "minOrdAmt") {
+			minOrdAmtVal = $(objId).val().removeComma();
+		}else if (proc == "minOrdQty") {
+			if($(objId).val()<=0){
+				mcxDialog.alertC('0보다 큰값을 입력 해주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$(objId).focus();
+					}
+				});
+				return;
+			}
+			minOrdQtyVal = $(objId).val();
+		}else if (proc == "maxOrdQty") {
+			if($(objId).val()<=0){
+				mcxDialog.alertC('0보다 큰값을 입력 해주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$(objId).focus();
+					}
+				});
+				return;
+			}
+			maxOrdQtyVal = $(objId).val();
+		}else if (proc == "dayMaxOrdQty") {
+			if($(objId).val()<=0){
+				mcxDialog.alertC('0보다 큰값을 입력 해주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$(objId).focus();
+					}
+				});
+				return;
+			}
+			dayMaxOrdQtyVal = $(objId).val();	
+		}else if (proc == "pntPrate") {
+			if($(objId).val()>100){
+				mcxDialog.alertC('100보다 작거나 같은 값을 입력 해주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$(objId).focus();
+					}
+				});
+				return;
+			}
+			pntPrateVal = $(objId).val();
+		}else if (proc == "pntMrate") {
+			if($(objId).val()>100){
+				mcxDialog.alertC('100보다 작거나 같은 값을 입력 해주세요.', {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$(objId).focus();
+					}
+				});
+				return;
+			}
+			pntMrateVal = $(objId).val();
+		}else if (proc == "giftPackYn") {
+			giftPackYnVal = $(objId).val();	
+		}else{
+			return;
+		}
+
+		mcxDialog.confirm('적용 하시겠습니까?', {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function(){
+				var arrGoodsCd = [];
+
+				$.each(selectedData, function(idx, item) {
+					arrGoodsCd.push(item.goodsCd);
+				});
+
+				var data = {arrGoodsCd: arrGoodsCd
+							,goodsStat : goodsStatVal
+							,erpStockLinkYn : erpStockLinkYnVal
+							,formalGb : formalGbVal
+							,returnableYn : returnableYnVal
+							,goodsTnm : goodsTnmVal
+							,blankFlag : blankFlagVal
+							,minOrdAmt : minOrdAmtVal
+							,maxOrdQty : maxOrdQtyVal
+							,dayMaxOrdQty : dayMaxOrdQtyVal
+							,pntPrate : pntPrateVal
+							,pntMrate : pntMrateVal
+							,giftPackYn : giftPackYnVal
+							,procJob : proc
+							};
+
+				var jsonData = JSON.stringify(data);
+				gagajf.ajaxJsonSubmit('/goods/state/update', jsonData, fnChangeGoodsStateCollback);
+
+			}
+		});
+	}
+	
+	// 입점 상품상태 변경시
+	var fnChangeGoodsStateSelfNo = function(proc){
+
+		var objId = '#'+proc+"NC";
+		
+		if (gagajf.isNull($(objId).val())){
+			mcxDialog.alertC('적용하실 항목을 선택(입력)해주세요.', {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$(objId).focus();
+				}
+			});
+			return;
+		}
+	
+		var selectedData = gridOptions.api.getSelectedRows();
+
+		if (selectedData.length == 0) {
+			mcxDialog.alert('선택된 행이 없습니다.');
+			return;
+		}
+		
+		var checkFlag = false;
+		$.each(selectedData, function(idx, item) {
+			if (item.selfGoodsYn == 'Y'){
+				checkFlag = true;
+				mcxDialog.alert('자사상품은 수정하실 수 없습니다.');
+				return;
+			}
+		});
+		
+		if (checkFlag){
+			return false;
+		}
+		
+		var goodsStatVal  = '';
+
+		if (proc == "goodsStat") {
+			goodsStatVal = $(objId).val();
+		}else{
+			return;
+		}
+
+		mcxDialog.confirm('적용 하시겠습니까?', {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function(){
+				var arrGoodsCd = [];
+
+				$.each(selectedData, function(idx, item) {
+					arrGoodsCd.push(item.goodsCd);
+				});
+
+				var data = {arrGoodsCd: arrGoodsCd
+							,goodsStat : goodsStatVal
+							,procJob : proc
+							};
+
+				var jsonData = JSON.stringify(data);
+				gagajf.ajaxJsonSubmit('/goods/state/update', jsonData, fnChangeGoodsStateCollback);
+
+			}
+		});
+	}
+
+	var fnChangeGoodsStateCollback = function(result){
+		if (result.resultFlag == "FAIL"){
+			mcxDialog.alert("[ " + result.returnGoods + " ]은<br/>이미지가 등록되지 않아 '승인대기'나 '승인완료' 상태로 변경할 수 없습니다.<br/>상품을 확인하시고, 다시 시도해주세요.");
+			return false;
+		}else{
+			mcxDialog.alert('성공적으로 저장되었습니다.');
+		}
+		fnGoodsListSearch($("#searchForm input[name=searchGb]").val());
+	}
+
+	//상태일괄변경 버튼 클릭시
+	var fnGoodsStatArea = function(){
+		if ($("#searchForm").find("#goodsStatArea").hasClass('off')) {
+			$("#searchForm").find("#goodsStatArea").removeClass('off');
+			$("#searchForm").find("#goodsStatArea").addClass('on');
+			
+			$("#searchForm").find("#goodsStatSelfNoArea").removeClass('on');
+			$("#searchForm").find("#goodsStatSelfNoArea").addClass('off');
+		}else{
+			$("#searchForm").find("#goodsStatArea").removeClass('on');
+			$("#searchForm").find("#goodsStatArea").addClass('off');
+		}
+	}
+	
+	// 입점 상태일괄변경 버튼 클릭시
+	var fnGoodsStaSelfNotArea = function(){
+		if ($("#searchForm").find("#goodsStatSelfNoArea").hasClass('off')) {
+			$("#searchForm").find("#goodsStatSelfNoArea").removeClass('off');
+			$("#searchForm").find("#goodsStatSelfNoArea").addClass('on');
+			
+			$("#searchForm").find("#goodsStatArea").removeClass('on');
+			$("#searchForm").find("#goodsStatArea").addClass('off');
+		}else{
+			$("#searchForm").find("#goodsStatSelfNoArea").removeClass('on');
+			$("#searchForm").find("#goodsStatSelfNoArea").addClass('off');
+		}
+	}
+	
+	//세트상품구성 클릭 시
+	$('#btnGoodsSetMake').click(function(e) {
+		cfnOpenGoodsSetPopup();
+	});
+	
+	//딜상품구성 클릭 시
+	$('#btnGoodsSetDeal').click(function(e) {
+		cfnOpenGoodsDealPopup();
+	});
+
+	// 자사/입점 변경여부
+	$("#searchForm input[name=selfYn]").bind('click change', function () {
+		var radioValue = $(this).val();
+		var selfGb = "S";	// 자사 공급 업체
+		if (radioValue == "N"){
+			selfGb = "E";	//입점 공급업체
+		}
+		
+		var actionUrl = '/renderer/supply/company/list/'+ selfGb;	
+
+		$('#searchForm').find('#multiBrand').empty();
+		//$("#searchForm select[name=brandCd] option:gt(0)").remove();
+
+		cfnCreateCombo(actionUrl, $('#searchForm select[name=supplyCompCd]'), "[전체]", "");
+		
+	});
+	
+	$(document).ready(function() {
+
+		cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '등록일', 'X');
+
+		var selectCode = '<select  name="dateGbn" id="dateGbn">';
+		selectCode += '<option value="R" seledted>상품등록일</option>';
+		selectCode += '<option value="P">가격변경일</option>';
+		selectCode += '<option value="S">최초승인일</option>';
+		selectCode += '</select>';
+
+		$("#searchForm").find('#sellTerms').prepend(selectCode);
+
+		// Create a agGrid
+		gagaAgGrid.createGrid('gridList', gridOptions);
+
+	});
+
+/*]]>*/
+</script>
+	</div>
+
+</html>

+ 430 - 0
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsMassRegisterForm.html

@@ -0,0 +1,430 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org"        >
+<!--
+ *******************************************************************************
+ * @source  : GoodsMassRegisterForm.html
+ * @desc    : 대량상품등록
+ *============================================================================
+ * SISUN
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2020.11.18   eskim       최초 작성
+ *******************************************************************************
+ -->
+	<div id="main">
+		<!-- 메인타이틀 영역 -->
+		<div class="main-title">
+		</div>
+		<!-- //메인타이틀 영역 -->
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<!-- 검색조건 영역 -->
+		<form id="massForm" name="massForm" >
+		<div class="panelStyle">
+			<ul class="notice">
+				<li>상품을 대량으로 등록하는 페이지입니다.</li>
+				<li>상품을 등록 할 경우 [승인대기] 상태이며, STYLE 관리자의 [승인완료] 상태 변경 후 FRONT애 노출이 가능합니다.</li>
+				<li><th:block th:if="${erpSyncYn == 'N'}"><em><b>ERP연동여부가 [N]입니다. 관리자에게 문의하세요.</b></em></th:block></li>
+			</ul>
+			<ul class="panelBar">
+				<li class="center">
+					<th:block th:if="${sessionInfo.roleCd == 'G001_0000' 
+									or sessionInfo.roleCd == 'G001_A000' 
+									or sessionInfo.roleCd == 'G001_A001' 
+									or sessionInfo.roleCd == 'G001_A100' 
+									or sessionInfo.roleCd == 'G001_A101'
+									or (sessionInfo.roleCd == 'G001_E000' and ( #strings.isEmpty(supplyCompCd) or supplyCompCd =='P'  or supplyCompCd =='T') )
+									}">
+						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF001');">자사상품 등록양식 다운로드</button>
+						<button th:if="${erpSyncYn == 'Y'}" type="button" class="btn btn-primary btn-lg" id="btnGoodsSelfCreate" >자사상품 등록</button>
+					</th:block>
+					<th:block th:if="${sessionInfo.roleCd == 'G001_0000' 
+									or sessionInfo.roleCd == 'G001_A000' 
+									or sessionInfo.roleCd == 'G001_A001' 
+									or sessionInfo.roleCd == 'G001_A100' 
+									or sessionInfo.roleCd == 'G001_B000' 
+									or (sessionInfo.roleCd == 'G001_E000' and (#strings.isEmpty(supplyCompCd) or (supplyCompCd != 'P' and supplyCompCd != 'T')) )
+									}">
+						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF005');">입점상품 등록양식 다운로드</button>
+						<button th:if="${erpSyncYn == 'Y'}" type="button" class="btn btn-primary btn-lg" id="btnGoodsCreate" >입점상품 등록</button>
+					</th:block>
+					<label class="off"><a href="javascript:void(0);" id="excelList" style="display: none;">엑셀다운로드</a></label>
+					<!--  추후 대량 수정 권한-->
+					<span th:if="${sessionInfo.roleCd == 'G001_0000' 
+									or sessionInfo.roleCd == 'G001_A000' 
+									or sessionInfo.roleCd == 'G001_A001' 
+									or sessionInfo.roleCd == 'G001_A100' 
+									or sessionInfo.roleCd == 'G001_A101'
+									or sessionInfo.roleCd == 'G001_B000' 
+								}" 
+							th:style="'padding-left:80px;'">
+						<button type="button" class="btn btn-default btn-lg" id="btnInit" onclick="cfnDownloadSampleFile('SF014');">상품대량수정 등록양식 다운로드</button>
+						<button th:if="${erpSyncYn == 'Y'}" type="button" class="btn btn-primary btn-lg" id="btnGoodsUpdate" >입점상품 등록</button>
+					</span>
+				</li>
+			</ul>
+		</div>
+		<div class="panelStyle" >
+			<!-- 검색조건 영역 -->
+			<div class="panelTitle">
+				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 하나를 꼭 입력해 주세요.</h3>
+			</div>
+			<div class="panelContent">
+				<table class="frmStyle">
+					<colgroup>
+						<col width="10%"/>
+						<col width="40%"/>
+						<col width="10%"/>
+						<col/>
+					</colgroup>
+					<tr>
+						<th>상품코드<i class="star"></i></th>
+						<td><input type="text" class="w130" name="condition" id="condition" maxlength="50"/></td>
+						<th>등록여부</th>
+						<td>
+							<select  name="regSuccYn" id="regSuccYn">
+								<option value="">[전체]</option>
+								<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>등록일<i class="star"></i></th>
+						<td colspan="3" id="sellTerms"></td>
+					</tr>
+				</table>
+				<ul class="panelBar">
+					<li>
+						<button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button>
+						<button type="button" class="btn btn-info btn-lg" id="btnSearch" >조회</button>
+					</li>
+				</ul>
+			</div>
+			<!-- //검색조건 영역 -->
+		</div>
+		<div class="panelStyle">
+			<!-- 검색결과 영역 -->
+			<!-- 상단버튼 영역  -->
+			<ul class="panelBar">
+				<li class="left">
+					<!-- 아이콘 툴팁 -->
+					<div class="iconTooltip">
+						<i class="fa fa-info" aria-hidden="true"></i>
+						<span class="left aL" style="width:580px;">
+						<!-- class="left" 또는 class="right" -->
+							<em>상품미등록</em><br/>
+							- 상품코드 오류 : 빈값, 길이 11이 아닐경우, '_'가 미존재<br/>
+							- 업체 오류 : 빈값, 'W'나 'F' 가 아닌경우<br/>
+							- 상품명 오류 : 빈값<br/>
+							- 제조국 오류 : 빈값<br/>
+							- 제조년월일 오류 : 빈값, 날짜형식이 맞는지<br/>
+							- ERP 미존재 상품코드 : ERP에 상품코드가 존재하는지<br/>
+							- 스타일 연도 오류 : 온라인에서 관리되지 않는 스타일 연도<br/>
+							- 성별 오류 : 온라인에서 관리되지 않는 성별<br/>
+							- 컬러 오류 : 온라인에서 관리되지 않는 컬러<br/>
+							- 상품코드 중복등록요청 : 등록된 상품코드 등록요청<br/>
+							- 품목 오류 : 온라인에서 관리되지 않는 품목<br/>
+							- ERP 브랜드 오류 : 온라인에서 관리되지 않는 ERP 브랜드<br/>
+							- 이미지 유형 오류 : 온라인에서 관리되지 않는 이미지유형<br/>
+							- 상품이미지 필수 오류 : IMG_PATH1
+							- 품목의 고시정보 없음 : 품목의 고시분류 매핑이 안되어 있는 경우<br/>
+							- 고시분류 오류 : 등록요청 고시분류 와 온라인에서 품목과 매핑된 고시분류가 다른 경우<br/>
+							<em>상품등록</em><br/>
+							- ERP 상품 사이즈 정보 없음 : ERP에 상품코드의 사이즈가 없을 경우<br/>
+						</span>
+					</div>
+					<!-- //아이콘 툴팁 -->
+				</li>
+				<!-- <li class="right">
+					<button type="button" class="btn btn-default btn-lg" id="btnGoodsRegExcelDownLoad">엑셀다운로드</button>
+				</li> -->
+			</ul>
+			<!-- //상단버튼 영역  -->
+			<div id="gridList" style="width: 100%; height: 500px;" class="ag-theme-balham"></div>
+			<!-- 검색결과 영역 -->
+		</div>
+		<!-- //검색조건 영역 -->
+		</form>
+	</div>
+
+<script th:inline="javascript">
+/*<![CDATA[*/
+	var niClsfCdList = gagajf.convertToArray([[${niClsfCdList}]]);
+	var columnDefs = [
+		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
+		{headerName: "작업일시", field: "regDt", width: 150, cellClass: 'text-center'},
+		{headerName: "상품등록여부", field: "regSuccYn", width: 100, cellClass: 'text-center'},
+		{headerName: "등록결과메세지", field: "regFailRsn", width: 200, cellClass: 'text-left'},
+		{headerName: "등록브랜드코드", field: "brandCd", width: 120, cellClass: 'text-center'},
+		{headerName: "업체코드", field: "supplyCompCd", width: 130, cellClass: 'text-center'},
+		{headerName: "상품코드", field: "goodsCd", width: 130, cellClass: 'text-center'},
+		{headerName: "상품명", field: "goodsNm", width: 150, cellClass: 'text-left'},
+		{headerName: "상품타이틀", field: "goodsTnm", width: 150, cellClass: 'text-left'},
+		{headerName: "검색어", field: "goodsSnm1", width: 150, cellClass: 'text-left'},
+		{headerName: "제조국", field: "makeNm", width: 100, cellClass: 'text-center'},
+		{headerName: "제조일", field: "makeYmd", width: 100, cellClass: 'text-center'},
+		{headerName: "이지미타입", field: "imgType", width: 100, cellClass: 'text-center'},
+		{headerName: "이미지경로1", field: "imgPath1", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로2", field: "imgPath2", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로3", field: "imgPath3", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로4", field: "imgPath4", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로5", field: "imgPath5", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로6", field: "imgPath6", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로7", field: "imgPath7", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로8", field: "imgPath8", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로9", field: "imgPath9", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로10", field: "imgPath10", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로11", field: "imgPath11", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로12", field: "imgPath12", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로13", field: "imgPath13", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로14", field: "imgPath14", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로15", field: "imgPath15", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로16", field: "imgPath16", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로17", field: "imgPath17", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로18", field: "imgPath18", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로19", field: "imgPath19", width: 200, cellClass: 'text-left'},
+		{headerName: "이미지경로20", field: "imgPath20", width: 200, cellClass: 'text-left'},
+		{headerName: "고시분류코드", field: "niClsfCd", width: 200, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(niClsfCdList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(niClsfCdList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(niClsfCdList, params.newValue); }
+		},
+		{headerName: "고시내용1", field: "niContent1", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용2", field: "niContent2", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용3", field: "niContent3", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용4", field: "niContent4", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용5", field: "niContent5", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용6", field: "niContent6", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용7", field: "niContent7", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용8", field: "niContent8", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용9", field: "niContent9", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용10", field: "niContent10", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용11", field: "niContent11", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용12", field: "niContent12", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용13", field: "niContent13", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용14", field: "niContent14", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용15", field: "niContent15", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용16", field: "niContent16", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용17", field: "niContent17", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용18", field: "niContent18", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용19", field: "niContent19", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용20", field: "niContent20", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용21", field: "niContent21", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용22", field: "niContent22", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용23", field: "niContent23", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용24", field: "niContent24", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용25", field: "niContent25", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용26", field: "niContent26", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용27", field: "niContent27", width: 200, cellClass: 'text-left'},
+		{headerName: "고시내용28", field: "niContent28", width: 200, cellClass: 'text-left'},
+		{headerName: "브랜드", field: "brandCd", width: 100, cellClass: 'text-center'},
+		{headerName: "품목", field: "itemkindCd", width: 100, cellClass: 'text-center'},
+		{headerName: "스타일연도", field: "styleYear", width: 100, cellClass: 'text-center'},
+		{headerName: "시즌", field: "seasonCd", width: 80, cellClass: 'text-center'},
+		{headerName: "성별", field: "sexGb", width: 80, cellClass: 'text-center'},
+		{headerName: "품번", field: "goodsNum", width: 100, cellClass: 'text-center'},
+		{headerName: "정상가", field: "listPrice", width: 100, cellClass: 'text-center'},
+		{headerName: "판매가", field: "currPrice", width: 100, cellClass: 'text-center'},
+		{headerName: "공급업체상품코드", field: "supplyGoodsCd", width: 130, cellClass: 'text-center'},
+		{headerName: "정상이월", field: "formalGb", width: 100, cellClass: 'text-center'},
+		/* {headerName: "옵션문자열", field: "optStr", width: 200, cellClass: 'text-center'},
+		{headerName: "안전재고문자열", field: "baseStockStr", width: 200, cellClass: 'text-center'},
+		{headerName: "현재고문자열", field: "currStockStr", width: 200, cellClass: 'text-center'}, */
+		{headerName: "매입유형", field: "buyingType", width: 80, cellClass: 'text-center'}
+	];
+
+	// Get GridOptions
+	var gridOptions = gagaAgGrid.getGridOptions(columnDefs);
+
+	$(document).ready(function() {
+		
+		cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '등록일', 'X');
+		gagaAgGrid.createGrid('gridList', gridOptions);
+		
+	});
+	
+	//자사상품대량등록 클릭시
+	$('#btnGoodsSelfCreate').on('click', function() {
+		cfnExcelUploadPopup('createSelfGoods', 'createSelfGoods');
+	});
+	
+	var createSelfGoods = function(result){
+		var data = {procJob : result.procJob
+					,excelFileNm : result.excelFileNm
+					};
+		var jsonData = JSON.stringify(data);
+		gagajf.ajaxJsonSubmit('/goods/mass/excelupload/create', jsonData, fnGoodsSelfCreateCallBack);
+	}
+	
+	var fnGoodsSelfCreateCallBack = function(result){
+		
+		var date = new Date();
+		$("#massForm input[name=stDate]").val(date.format("YYYY-MM-DD"));
+		$("#massForm input[name=edDate]").val(date.format("YYYY-MM-DD"));
+		fnGoodsListSearch();
+	}
+	
+	//입점상품대량등록 클릭시
+	$('#btnGoodsCreate').on('click', function() {
+		cfnExcelUploadPopup('createGoods', 'createGoods');
+	});
+	
+	var createGoods = function(result){
+		var data = {procJob : result.procJob
+					,excelFileNm : result.excelFileNm
+					};
+		var jsonData = JSON.stringify(data);
+		gagajf.ajaxJsonSubmit('/goods/mass/excelupload/create', jsonData, fnGoodsCreateCallBack);
+	}
+	
+	var fnGoodsCreateCallBack = function(result){
+		
+		var date = new Date();
+		$("#massForm input[name=stDate]").val(date.format("YYYY-MM-DD"));
+		$("#massForm input[name=edDate]").val(date.format("YYYY-MM-DD"));
+		fnGoodsListSearch();
+	}
+	
+	//상품대량수정 클릭시
+	$('#btnGoodsUpdate').on('click', function() {
+		cfnExcelUploadPopup('updateGoods', 'updateGoods');
+	});
+	
+	var updateGoods = function(result){
+		var data = {procJob : result.procJob
+					,excelFileNm : result.excelFileNm
+					};
+		var jsonData = JSON.stringify(data);
+		gagajf.ajaxJsonSubmit('/goods/mass/excelupload/update', jsonData, fnGoodsUpdateCallBack);
+	}
+	
+	var fnGoodsUpdateCallBack = function(result){
+		
+		var date = new Date();
+		$("#massForm input[name=stDate]").val(date.format("YYYY-MM-DD"));
+		$("#massForm input[name=edDate]").val(date.format("YYYY-MM-DD"));
+		fnGoodsListSearch();
+	}
+	
+	$('#btnGoodsRegExcelDownLoad').on('click', function() {
+		
+		var date = new Date().format("YYYYMMDDHHmmss");
+		var params = {
+			
+			fileName : "상품대량등록결과_"+ date,
+			sheetName: "DATA"
+		}
+		gridOptions.excelStyles = [
+			{
+				id: 'text-center',
+				dataType: 'string',
+				font: {size : 10, bold: false}
+			},
+			{
+				id: 'text-left',
+				dataType: 'string',
+				font: {size : 10, bold: false}
+			}
+		]
+		
+		gridOptions.api.exportDataAsExcel(params);
+		
+	});
+	
+	// 초기화 클릭시
+	$('#btnInit').on('click', function() {
+		$('#massForm')[0].reset();
+	});
+	
+	// 조회클릭시
+	$('#btnSearch').on('click', function() {
+		
+		if( gagajf.isNull($("#massForm input[name=condition]").val())
+			&& gagajf.isNull($("#massForm input[name=stDate]").val()) 
+			&& gagajf.isNull($("#massForm input[name=edDate]").val())){
+			
+			mcxDialog.alertC("검색조건을 입력하세요.",  {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$('#massForm input[name=condition]').focus();
+				}
+			});
+			return false;
+		}
+		
+		var fromDate = $('#massForm input[name=stDate]').val();
+		var toDate = $('#massForm input[name=edDate]').val();
+		
+		if (!gagajf.isNull(fromDate) || !gagajf.isNull(toDate)) {
+			
+			if (gagajf.isNull(fromDate) || gagajf.isNull(toDate)) {
+				mcxDialog.alertC("등록일 조회시 시작일자와 종료일자를 입력하세요.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$('#massForm input[name=stDate]').focus();
+					}
+				});
+				return false;
+			}
+
+			if (fromDate > toDate) {
+				mcxDialog.alertC("노출기간 시작일자는 종료일자 보다 클 수 없습니다.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$('#massForm input[name=stDate]').focus();
+					}
+				});
+				return false;
+			} 
+		}
+		fnGoodsListSearch();
+	});
+	
+	// 조회
+	var fnGoodsListSearch = function(gbn) {
+		gagaAgGrid.fetch('/goods/reg/log/list', gridOptions, '#massForm');
+	}
+	
+	//안내팝업
+	var fnGoodsOpenCommentPopup = function(id) {
+		var str = '<div class="popupWrap" id="'+id+'" style="z-index:30">';
+		str = str + '<div class="popup modeless ui-widget-content ui-draggable ui-draggable-handle" style="display: block;  position: relative;">';
+		str = str + '<button type="button" class="close" onclick="uifnPopClose(\''+id+'\')"><i class="fa fa-times"></i></button>';
+		str = str + '<div class="mdPopContent">';
+		str = str + '<ul class="notice ">';
+		str = str + '- <em>상품미등록</em>';
+		str = str + '<li>상품코드 오류 : 빈값</li>';
+		str = str + '<li>업체 오류 : 빈값</li>';
+		str = str + '<li>상품명 오류 : 빈값</li>';
+		str = str + '<li>제조국 오류 : 빈값</li>';
+		str = str + '<li>제조년월일 오류 : 빈값, 날짜형식이 맞는지</li>';
+		str = str + '<li>WMS 미존재 상품코드 : WMS에 상품코드가 존재하는지</li>';
+		str = str + '<li>스타일 연도 오류 : 온라인에서 관리되지 않는 스타일 연도</li>';
+		str = str + '<li>성별 오류 : 온라인에서 관리되지 않는 성별</li>';
+		str = str + '<li>상품코드 중복등록요청 : 등록된 상품코드 등록요청</li>';
+		str = str + '<li>품목 오류 : 온라인에서 관리되지 않는 품목</li>';
+		str = str + '<li>WMS 브랜드 오류 : 온라인에서 관리되지 않는 WMS 브랜드</li>';
+		str = str + '<li>이미지 유형 오류 : 온라인에서 관리되지 않는 이미지유형</li>';
+		str = str + '<li>상품이미지 필수 오류 : A타입 : IMG_PATH1: 정사각형이미지(앞면),IMG_PATH3: 작사각형이미지(정면),<br/></li>';
+		str = str + '<span style="padding-left:185px;"></span>';
+		str = str + 'IMG_PATH4: 직사각형이미지(뒷면), IMG_PATH5: 상품상세컷(통자)';
+		str = str + '<li>상품이미지 필수 오류 : B타입 : IMG_PATH1, IMG_PATH2</li>';
+		str = str + '<li>품목의 고시정보 없음 : 품목의 고시분류 매핑이 안되어 있는 경우</li>';
+		str = str + '<li>고시분류 오류 : 등록요청 고시분류 와 온라인에서 품목과 매핑된 고시분류가 다른 경우</li>';
+		str = str + '- <em>상품등록</em>';
+		str = str + '</ul>';
+		str = str + '</div></div></div>';
+
+		if ($('#'+ id).length == 0) {
+			$('body').append(str);
+		}
+		$("#"+id).css({display:"block"});
+	}
+	
+/*]]>*/
+</script>
+</html>

+ 548 - 0
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsPopupListForm.html

@@ -0,0 +1,548 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : GoodsPopupListForm.html
+ * @desc    : 상품 조회 팝업
+ *============================================================================
+ * SISUN
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2020.10.26   eskim       최초 작성
+ *******************************************************************************
+ -->
+	<div class="modalPopup" data-width="1700">
+	<div class="panelStyle">
+		<!-- TITLE -->
+		<div class="panelTitle">
+			<h2>상품조회</h2>
+			<button type="button" class="close" onclick="uifnPopupClose('popupGoods')"><i class="fa fa-times"></i></button>
+		</div>
+		<!-- //TITLE -->
+		<form id="goodsPopupForm" name="goodsPopupForm" action="#" th:action="@{'/goods/popup/list'}">
+		<div class="panelContent">
+			<ul class="notice">
+				<li>아래 검색조건 중 <font color="red">업체, 키워드, 발생일</font>중 하나를 꼭 입력해 주세요.</li>
+			</ul>
+			<table class="frmStyle">
+				<colgroup>
+					<col style="width: 7%;"/>
+					<col style="width: 21%;"/>
+					<col style="width: 7%;"/>
+					<col style="width: 18%;"/>
+					<col style="width: 7%;"/>
+					<col style="width: 18%;"/>
+					<col style="width: 7%;"/>
+					<col/>
+				</colgroup>
+				<tr>
+					<th>업체/브랜드<em class="required" title="필수"></em></th>
+					<td colspan="3">
+						<label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnY" value="Y"  checked/>자사</label>
+						<label class="rdoBtn"><input type="radio" name="selfYn" id="selfYnN" value="N"/>입점</label>
+						<select name="supplyCompCd" id="supplyCompCd">
+							<option value="" th:if="${sessionInfo.roleCd} != 'G001_B000'">[전체]</option>
+							<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select>
+						<span id="multiBrand"></span>
+					</td>
+					<th>상품타입</th>
+					<td>
+						<select name="goodsType" id="goodsType">
+							<option value="">[전체]</option>
+							<option th:if="${goodsTypeList}" th:each="oneData, status : ${goodsTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select>
+					</td>
+					<th rowspan="4">키워드<em class="required" title="필수"></em></th>
+					<td rowspan="4">
+						<select name="search" id="search">
+							<option value="searchGoodsCd">상품코드</option>
+							<option value="searchGoodsNm">상품명</option>
+							<option value="searchGoodsNum">품번</option>
+							<option value="searchSupplyGoodsCd">업체상품코드</option>
+						</select>
+						<!-- <input type="text" class="w40p" name="condition" id="condition" maxlength="50"/> -->
+						<textarea class="textareaR3 w70p" name="condition" id="condition"></textarea>
+					</td>
+				</tr>
+				<tr>
+					<th>품목</th>
+					<td>
+						<div class="multiCheckBox"  style="width:300px">
+							<button type="button" class="sltBtn">[전체]</button>
+							<ul style="overflow:auto; height:170px;">
+								<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiItemkindCd" onclick="uifnAllCheck('multiItemkindCd')">전체선택</label></li>
+								<li th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}"><label class="chkBox"><input type="checkbox" name="multiItemkindCd" th:id="${'itemkindCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+							</ul>
+						</div>
+					</td>
+					<th>상품상태</th>
+					<td>
+						<div class="multiCheckBox"  style="width:200px">
+							<button type="button" class="sltBtn">[전체]</button>
+							<ul style="overflow:auto; height:170px">
+								<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiGoodsStat" onclick="uifnAllCheck('multiGoodsStat')">전체선택</label></li>
+								<li th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}"><label class="chkBox"><input type="checkbox" name="multiGoodsStat" th:id="${'goodsStat' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+							</ul>
+						</div>
+					</td>
+					<th>정상/이월 구분</th>
+					<td>
+						<select  name="formalGb" id="formalGb">
+							<option value="">[전체]</option>
+							<option th:if="${formalGbList}" th:each="oneData, status : ${formalGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select>
+					</td>
+					
+				</tr>
+				<tr>
+					<th>년도/시즌</th>
+					<td>
+						<!-- <select  name="styleYear" id="styleYear">
+							<option value="">[전체]</option>
+							<option th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select>
+						<select  name="seasonCd" id="seasonCd">
+							<option value="">[전체]</option>
+							<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select> -->
+						<div class="multiCheckBox" style="width:140px;">
+							<button type="button" class="sltBtn">[전체]</button>
+							<ul style="overflow:auto; height:140px">
+								<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiStyleYear" onclick="uifnAllCheck('multiStyleYear')">전체선택</label></li>
+								<li th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}"><label class="chkBox"><input type="checkbox" name="multiStyleYear" th:id="${'styleYear' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+							</ul>
+						</div>
+						<div class="multiCheckBox" style="width:170px;">
+							<button type="button" class="sltBtn">[전체]</button>
+							<ul style="overflow:auto; height:170px">
+								<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiSeasonCd" onclick="uifnAllCheck('multiSeasonCd')">전체선택</label></li>
+								<li th:if="${seasonList}" th:each="oneData, status : ${seasonList}"><label class="chkBox"><input type="checkbox" name="multiSeasonCd" th:id="${'seasonCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+							</ul>
+						</div>
+					</td>
+					<th>연령대</th>
+					<td>
+						<select  name="ageGrpCd" id="ageGrpCd">
+							<option value="">[전체]</option>
+							<option th:if="${ageGrpCdList}" th:each="oneData, status : ${ageGrpCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select>
+					</td>
+					<th>성별</th>
+					<td>
+						<select  name="sexGb" id="sexGb">
+							<option value="">[전체]</option>
+							<option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select>
+					</td>
+				</tr>
+				<tr>
+					<th>재고연동여부</th>
+					<td>
+						<select  name="erpStockLinkYn" id="erpStockLinkYn">
+							<option value="">[전체]</option>
+							<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select>
+					</td>
+					<th>자사몰노출여부</th>
+					<td>
+						<select  name="dispYn" id="dispYn">
+							<option value="">[전체]</option>
+							<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select>
+					</td>
+					<th>품절여부</th>
+					<td>
+						<select  name="soldOutYn" id="soldOutYn">
+							<option value="">[전체]</option>
+							<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select>
+					</td>
+				</tr>
+				<tr>
+					<th>반품가능여부</th>
+					<td>
+						<select  name="returnableYn" id="returnableYn">
+							<option value="">[전체]</option>
+							<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+						</select>
+						<!-- <label class="chkBox"><input type="checkbox" name="returnableYn" value="Y"/>반품가능</label>
+						<label class="chkBox"><input type="checkbox" name="changeableYn" value="Y"/>교환가능</label>
+						<label class="chkBox"><input type="checkbox" name="returnFeeFreeYn" value="Y"/>무료반품</label>
+						<label class="chkBox"><input type="checkbox" name="changeFeeFreeYn" value="Y"/>무료교환</label> -->
+					</td>
+					<th>담당MD</th>
+					<td>
+						<select  name="mdId" id="mdId">
+							<option value="">[전체]</option>
+							<option th:if="${brandMdList}" th:each="oneData, status : ${brandMdList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
+						</select>
+					</td>
+					<th>판매가</th>
+					<td>
+						<input type="text" class="w90" name="currPriceSt" id="currPriceSt" maxlength="10" data-valid-type="numeric"/>원 ~ <input type="text" class="w90" name="currPriceEd" id="currPriceEd" maxlength="10" data-valid-type="numeric"/>원
+					</td>
+					<th>할인율</th>
+					<td>
+						<input type="text" class="w70" name="dcRateSt" id="dcRateSt" maxlength="3" data-valid-type="numeric"/> % ~ <input type="text" class="w70" name="dcRateEd" id="dcRateEd" maxlength="3" data-valid-type="numeric"/> %
+					</td>
+				</tr>
+				<tr>
+					<th>발생일<em class="required" title="필수"></em></th>
+					<td colspan="7" id="sellTermsP"></td>
+				</tr>
+			</table>
+			<ul class="panelBar">
+				<li class="center">
+					<button type="button" class="btn btn-gray btn-lg" id="btnPopupGoodsInit" >초기화</button>
+					<button type="button" class="btn btn-info btn-lg" id="btnPopupGoodsSearch" >조회</button>
+				</li>
+			</ul>
+		</div>	
+			
+			<ul class="panelBar">
+				<li>검색 결과 : <em><span id="gridRowTotalCount">0</span></em>개가 검색되었습니다.
+				<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
+				</li>
+				<li class="right">
+					<select class="w100" name="pageSize" id="pageSize">
+						<option value="50" selected>50개</option>
+						<option value="100">100개</option>
+						<option value="500">500개</option>
+					</select>
+					<span class="btnRight" style="margin-top: 4px;">쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>&nbsp;&nbsp;</span>
+				</li>
+			</ul>
+			<div id="gridPopupGoodsList" style="width: 100%; height: 400px;" class="ag-theme-balham lh60"></div>
+			<!-- 버튼 배치 영역 -->
+			<ul class="panelBar">
+				<li class="center">
+					<div class="tablePaging" id="goodsPopupListPagination"></div>
+				</li>
+			</ul>
+			<ul class="panelBar">
+				<li class="right">
+					<button type="button" class="btnRight btn btn-base btn-lg" id="btnPopupGoodsApply">적용</button>
+				</li>
+			</ul>
+			</form>
+			<!-- //버튼 배치 영역 -->
+		</div>
+	</div>
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js?v=2019072202"></script>
+<script th:inline="javascript">
+/*<![CDATA[*/
+	var sessRoleCd = [[${sessionInfo.roleCd}]];
+	var goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
+	var formalGbList = gagajf.convertToArray([[${formalGbList}]]);
+	var seasonList = gagajf.convertToArray([[${seasonList}]]);
+	var uploadGoodsUrl = [[${@environment.getProperty('upload.goods.view')}]];
+	
+	var popupGoodsColumnDefs = [
+		{width: 40, minWidth: 40, cellClass: 'text-right', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+		{headerName: 'No', width: 60, cellClass: 'text-center',
+			valueGetter: function(params) { return cfnGridNumner('goodsPopupForm',params.node.rowIndex, 'A');}
+		},
+		{headerName: "이미지", field: "imgPath1", width: 100, height: 60, cellClass: 'text-center'
+			,cellRenderer: function(params) {
+				if (params.data.imgType == "G030_A"){
+					if(!gagajf.isNull(params.data.imgPath6)){
+						return '<img width="60" src="'+ params.data.imgPath1 + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
+					}else{
+						return '<img width="60" src="'+ params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
+					}
+				}else{
+					if(!gagajf.isNull(params.data.imgPath6)){
+						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
+					}else{
+						return '<img width="60" src="'+ uploadGoodsUrl+params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
+					}	
+				}
+			}
+		},
+		{headerName: "브랜드", field: "brandCd", width: 100, cellClass: 'text-center'},
+		{headerName: "브랜드명", field: "brandEnm", width: 130, cellClass: 'text-center'},
+		{headerName: "상품코드", field: "goodsCd", width: 140, cellClass: 'text-center'},
+		{headerName: "상품명", field: "goodsNm", width: 200, cellClass: 'text-left'},
+		{headerName: "품목", field: "itemkindNm", width: 150, cellClass: 'text-left'},
+		{headerName: "재고", field: "stockQtySum", width: 80, cellClass: 'text-right',
+			valueFormatter: function(params) {	return params.value.addComma();}
+		},
+		{headerName: "상품상태", field: "goodsStat" , width: 120, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
+		},
+		{headerName: "15일간판매수량", field: "sellDay15Qty", width: 120, cellClass: 'text-right',
+			valueFormatter: function(params) {	return params.value.addComma();}
+		},
+		{headerName: "년도", field: "styleYear" , width: 90, cellClass: 'text-center'},
+		{headerName: "시즌", field: "seasonCd" , width: 90, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(seasonList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(seasonList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(seasonList, params.newValue); }
+		},
+		{headerName: "정상가", field: "listPrice" , width: 100, cellClass: 'text-right'
+			,valueFormatter: function(params) {return params.value.addComma();},
+			cellEditor: 'textCellEditor',
+			cellEditorParams: { maxlength: 14, validType: 'numeric'}
+		},
+		{headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
+			,valueFormatter: function(params) {return params.value.addComma();},
+			cellEditor: 'textCellEditor',
+			cellEditorParams: { maxlength: 14, validType: 'numeric'}
+		},
+		{headerName: "할인율", field: "dcRate" , width: 90, cellClass: 'text-right'},
+		{headerName: "가격변경일", field: "priceUpdDt", width: 150, cellClass: 'text-center',
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "이월구분", field: "formalGb", width: 100, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(formalGbList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(formalGbList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(formalGbList, params.newValue); }
+		},
+		{headerName: "반품가능", field: "returnableYn" , width: 90, cellClass: 'text-center'},
+		{headerName: "수정일자", field: "updDt", width: 150, cellClass: 'text-center',
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "수정자", field: "updNm" , width: 100, cellClass: 'text-center'}
+	];
+
+	// Get GridOptions
+	var popupGoodsGridOptions = gagaAgGrid.getGridOptions(popupGoodsColumnDefs);
+
+	// Add on options
+	popupGoodsGridOptions.suppressRowClickSelection = true;
+	popupGoodsGridOptions.rowSelection = 'multiple';
+
+	popupGoodsGridOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
+
+	popupGoodsGridOptions.getRowStyle = function(params) {
+		if ("G008_00" == params.data.goodsStat  || "G008_10" == params.data.goodsStat || "G008_20" == params.data.goodsStat || "G008_30" == params.data.goodsStat) {
+			return { background: '#23c6c8' };
+		}
+	}
+
+	// 초기화클릭시
+	$('#btnPopupGoodsInit').on('click', function() {
+		$('#goodsPopupForm')[0].reset();
+		//$("#goodsPopupForm input[type=radio]").removeClass("checked");
+		$("#goodsPopupForm input[type=checkbox]").removeClass("checked");
+		//$("#goodsPopupForm input[type=radio]").parent("label").removeClass("checked");
+		$("#goodsPopupForm input[type=checkbox]").parent("label").removeClass("checked");
+		$("#goodsPopupForm input[type=radio][checked]").parent("label").addClass("checked");
+	});
+
+	// 조회클릭시
+	$('#btnPopupGoodsSearch').on('click', function() {
+		fnPopupGoodsSearch();
+	});
+
+
+	// 조회
+	var fnPopupGoodsSearch = function() {
+
+		var formId = '#goodsPopupForm';
+		// Fetch data
+		//gagaAgGrid.fetch($(formId).prop('action'), popupGoodsGridOptions, formId, fnPopupGoodsSearchCallBack);
+
+		if(!fnPopupGoodsConditionCheck()) return;
+
+		gagaPaging.init('goodsPopupForm', fnPopupGoodsSearchCallBack, 'goodsPopupListPagination', $('#goodsPopupForm').find('#pageSize').val());
+		gagaPaging.load(1);
+
+	}
+
+	//검색 조건 확인
+	var fnPopupGoodsConditionCheck = function(){
+		var formId = '#goodsPopupForm';
+		var form = document.goodsPopupForm;
+
+		if($("#goodsPopupForm input[name=searchGb]").val() == "EXCEL") return true;
+
+		var searchFlag = false;
+		var cnt = 0;
+
+		if( !gagajf.isNull($("#goodsPopupForm select[name=supplyCompCd]").val())
+				|| !gagajf.isNull($("#goodsPopupForm textarea[name=condition]").val())
+				|| (!gagajf.isNull($("#goodsPopupForm input[name=stDate]").val()) && !gagajf.isNull($("#goodsPopupForm input[name=edDate]").val())
+				|| !gagajf.isNull($("#goodsPopupForm select[name=brandGrpNm]").val())
+
+				)
+			){
+			searchFlag = true;
+		}else{
+			/* for (i = 0; i < form.elements.length; i++ ) {
+				var el = form.elements[i];
+
+				if ((el.getAttribute("type") == "text" || el.getAttribute("type") == "select-one") || el.name== "supplyCompCd") {
+					if (!(el.value == null || el.value == "")) {
+						cnt++;
+					}
+				}
+			}
+
+			if(cnt > 0) searchFlag = true; */
+		}
+
+		if(searchFlag == false){
+			mcxDialog.alert("검색조건을 입력하세요.");
+			return false;
+		}
+
+		if(!gagajf.isNull($("#goodsPopupForm input[name=currPriceSt]").val()) && !gagajf.isNull($("#goodsPopupForm input[name=currPriceEd]").val())){
+			if (Number($("#goodsPopupForm input[name=currPriceSt]").val().removeComma()) > Number($("#goodsPopupForm input[name=currPriceEd]").val().removeComma()) ){
+				mcxDialog.alertC("판매가를 확인해 주세요.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$("#goodsPopupForm input[name=currPriceEd]").focus();
+					}
+				});
+				return false;
+			}
+		}
+
+		if(!gagajf.isNull($("#goodsPopupForm input[name=dcRateSt]").val()) && !gagajf.isNull($("#goodsPopupForm input[name=dcRateEd]").val())){
+			if (Number($("#goodsPopupForm input[name=dcRateSt]").val().removeComma()) > Number($("#goodsPopupForm input[name=dcRateEd]").val().removeComma()) ){
+				mcxDialog.alertC("할인율를 확인해 주세요.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$("#goodsPopupForm input[name=dcRateEd]").focus();
+					}
+				});
+				return false;
+			}
+		}
+
+		var fromDate = $('#goodsPopupForm input[name=stDate]').val();
+		var toDate = $('#goodsPopupForm input[name=edDate]').val();
+
+		if (!gagajf.isNull(fromDate) || !gagajf.isNull(toDate)) {
+
+			if (gagajf.isNull(fromDate) || gagajf.isNull(toDate)) {
+				mcxDialog.alertC("등록일 조회시 시작일자와 종료일자를 입력하세요.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$('#goodsPopupForm input[name=stDate]').focus();
+					}
+				});
+				return false;
+			}
+
+			if (fromDate > toDate) {
+				mcxDialog.alertC("노출기간 시작일자는 종료일자 보다 클 수 없습니다.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$('#goodsPopupForm input[name=stDate]').focus();
+					}
+				});
+				return false;
+			}
+		}
+
+		return true;
+	}
+	var fnPopupGoodsSearchCallBack = function(result) {
+
+		if (!gagajf.isNull(result.couponGoodsList)) {
+			PopupCouponGoodsList = result.couponGoodsList;
+		}
+
+		$('#goodsPopupForm').find('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+		$('#goodsPopupForm').find('#pageNo').val(result.pageing.pageable.pageNo.addComma());
+		$('#goodsPopupForm').find('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+		$('#goodsPopupForm').find('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+		popupGoodsGridOptions.api.setRowData(result.goodsList);
+		gagaPaging.createPagination(result.pageing.pageable);
+
+	}
+
+	// 적용버튼 클릭시
+	$('#btnPopupGoodsApply').on('click', function() {
+		var callback = [[${params.callBackFun}]];
+		//console.log(callback);
+		var selectedData = popupGoodsGridOptions.api.getSelectedRows();
+
+		if(selectedData.length == 0){
+			mcxDialog.alert("선택된 데이터가 없습니다.");
+			return false;
+		}
+
+		var jsonData = JSON.stringify(selectedData);
+
+		if( typeof callback != 'undefined' && callback){
+
+			if (typeof callback == 'function') {
+				callback(jsonData);
+			}else{
+				if( callback ) {
+					if( callback.indexOf("(") == -1 ) eval( callback +"(" + jsonData+")");
+					else eval( callback(jsonData) );
+				}
+			}
+			//uiPopupClose('goodsPopupForm');
+		}
+	});
+
+	//업체변경시
+	$('#goodsPopupForm select[name=supplyCompCd]').on('change', function() {
+		var actionUrl = '/renderer/supplyCompany/brand/list/' + $(this).val();
+
+		if(sessRoleCd == "G001_B000"){
+			actionUrl = '/renderer/brand/AuthBrandlist';
+		}
+		//$("#goodsPopupForm select[name=brandCd] option:gt(0)").remove();
+		//cfnCreateCombo(actionUrl, $('#goodsPopupForm select[name=brandCd]'), "[전체]", brandCd);
+		
+		cfnCreateMultiCombo(actionUrl,"multiBrand",  "[전체]",null, 'Y', null, null, 'goodsPopupForm');
+	});
+	
+	// 자사/입점 변경여부
+	$("#goodsPopupForm input[name=selfYn]").bind('click change', function () {
+		var radioValue = $(this).val();
+		var selfGb = "S";	// 자사 공급 업체
+		if (radioValue == "N"){
+			selfGb = "E";	//입점 공급업체
+		}
+		
+		var actionUrl = '/renderer/supply/company/list/'+ selfGb;
+
+		$('#goodsPopupForm').find('#multiBrand').empty();
+		//$("#searchForm select[name=brandCd] option:gt(0)").remove();
+
+		cfnCreateCombo(actionUrl, $('#goodsPopupForm select[name=supplyCompCd]'), "[전체]", "");
+		
+	});
+
+	$(document).ready(function() {
+		cfnCreateCalendar('#sellTermsP', 'stDate', 'edDate', true, '등록일', 'X');
+
+		var selectCode = '<select  name="dateGbn" id="dateGbn"  class="w100">';
+		selectCode += '<option value="R" seledted>상품등록일</option>';
+		selectCode += '<option value="P">가격변경일</option>';
+		selectCode += '<option value="S">최초승인일</option>';
+		selectCode += '</select>';
+
+		$("#goodsPopupForm").find('#sellTermsP').prepend(selectCode);
+
+		// Create a agGrid
+		gagaAgGrid.createGrid('gridPopupGoodsList', popupGoodsGridOptions);
+		
+		// 입점 사용자 브랜드 조회 처리
+		if(sessRoleCd == "G001_B000"){
+			actionUrl = '/renderer/brand/AuthBrandlist';
+			cfnCreateMultiCombo(actionUrl,"multiBrand",  "[전체]",null, 'Y', null, null, 'goodsPopupForm');
+		}
+
+	});
+
+/*]]>*/
+</script>
+</html>

+ 344 - 0
style24.scm/src/main/webapp/WEB-INF/views/goods/GoodsSupplyPriceForm.html

@@ -0,0 +1,344 @@
+<!DOCTYPE html>
+<html lang="ko"
+	xmlns:th="http://www.thymeleaf.org">
+<!--
+ *******************************************************************************
+ * @source  : GoodsSupplyPriceForm.html
+ * @desc    : 입점 상품 가격 승인  관리
+ *============================================================================
+ * SISUN
+ * Copyright(C) 2020 TSIT, All rights reserved.
+ *============================================================================
+ * VER  DATE         AUTHOR      DESCRIPTION
+ * ===  ===========  ==========  =============================================
+ * 1.0  2020.11.18   eskim       최초 작성
+ *******************************************************************************
+ -->
+	<div id="main">
+		<!-- 메인타이틀 영역 -->
+		<div class="main-title">
+		</div>
+		<!-- //메인타이틀 영역 -->
+		<!-- 메뉴 설명 -->
+		<div class="infoBox menu-desc">
+		</div>
+		<form id="goodsPriceHstForm" name="goodsPriceHstForm" action="#" th:action="@{'/goods/price/hst/list'}">
+		<input type="hidden" id="confirmY" name="confirmY">
+ 		<!-- 패널 영역1 -->
+		<div class="panelStyle" >
+			<div class="panelTitle">
+				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 하나를 꼭 입력해 주세요.</h3>
+			</div>
+			<div class="panelContent">
+				<table class="frmStyle">
+					<colgroup>
+						<col width="10%"/>
+						<col width="40%"/>
+						<col width="10%"/>
+						<col/>
+					</colgroup>
+					<tr>
+						<th>업체/브랜드</th>
+						<td>
+							<select name="supplyCompCd" id="supplyCompCd">
+								<option value="" th:if="${sessionInfo.roleCd} != 'A101'">[전체]</option>
+								<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+							<select name="brandCd" id="brandCd">
+								<option value="">[전체]</option>
+							</select>
+						</td>
+						<th>상품코드</th>
+						<td>
+							<input type="text" class="w150" name="goodsCd" id="goodsCd" maxlength="50"/>
+						</td>
+					</tr>
+					<tr>
+						<th>발생일</th>
+						<td colspan="3" id="sellTerms"></td>
+					</tr>
+				</table>
+				<ul class="panelBar">
+					<li class="center">
+						<button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button>
+						<button type="button" class="btn btn-info btn-lg" id="btnSearch" >조회</button>&nbsp;&nbsp;&nbsp;&nbsp;
+						<button type="button" class="btn btn-base btn-lg" id="btnConfirmSearch" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">미승인목록 조회</button>
+					</li>
+				</ul>
+			</div>
+			<!-- //검색조건 영역 -->
+		</div>
+		<!-- 패널 영역1 -->
+		<div class="panelStyle">
+			<!-- 상단버튼 영역  -->
+			<ul class="panelBar">
+				<li class="right">
+					<button type="button" class="btn btn-success btn-lg" id="btnSaveGoodsPriceConfirm" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">승인</button>
+				</li>
+			</ul>
+			<!-- //상단버튼 영역  -->
+			<!-- 검색결과 영역 -->
+			<div id="gridList" style="width: 100%; height: 550px;" class="ag-theme-balham"></div>
+			<!-- 검색결과 영역 -->
+		</div>
+		</form>
+		<!-- //패널 영역2 -->
+<script type="text/javascript" src="/ux/plugins/gaga/gaga.paging.js?v=2019072202"></script>
+<script th:inline="javascript">
+/*<![CDATA[*/
+	var sessRoleCd = [[${sessionInfo.roleCd}]];
+	var goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
+	var formalGbList = gagajf.convertToArray([[${formalGbList}]]);
+	var columnDefs = [];
+	
+	columnDefs = [
+		{width: 40, minWidth: 40, cellClass: 'text-right', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
+		{headerName: "등록일", field: "regYmd", width: 90, cellClass: 'text-center',
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDD").format("YYYY-MM-DD") : '';
+			}
+		},
+		{headerName: "상품코드", field: "goodsCd", width: 130, cellClass: 'text-center'
+			,cellRenderer: function(params) {
+				return '<a href="javascript:void(0);">' + params.value + '</a>';
+			}
+		},
+		{headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
+		},
+		{headerName: "온라인 판매가", field: "onPrice", width: 120, cellClass: 'text-right'
+			,valueFormatter: function(params) {return params.value.addComma();}
+		},
+		{headerName: "판매가조정대상금액", field: "gapPrice", width: 140, cellClass: 'text-right'
+			,cellRenderer: function(params) {
+				var gapPrice = Number(params.data.onPrice) - Number(params.data.erpPrice);
+				
+				if (gapPrice >= 0){
+					return '<font color="red"> '+ gapPrice.addComma() +'</font>';
+				}else{
+					return '<font color="blue"> '+ gapPrice.addComma() +'</font>';
+				}
+			}
+		},
+		{headerName: "온라인 판매수수료", field: "onTagPrice", width: 140, cellClass: 'text-right'
+			,valueFormatter: function(params) {return params.value.addComma();}
+		},
+		{headerName: "판매수수료 조정대상수수료", field: "gapTagPrice", width: 180, cellClass: 'text-right'
+			,cellRenderer: function(params) {
+				var gapTagPrice = Number(params.data.onTagPrice) - Number(params.data.erpTagPrice);
+				
+				if (gapTagPrice >= 0){
+					return '<font color="red"> '+ gapTagPrice.addComma() +'</font>';
+				}else{
+					return '<font color="blue"> '+ gapTagPrice.addComma() +'</font>';
+				}
+			}
+		},
+		{headerName: "승인자", field: "applyId", width: 130, cellClass: 'text-center'},
+		{headerName: "승인일자", field: "applyDt" , width: 150, cellClass: 'text-center',
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "등록일시", field: "regDt", width: 180, cellClass: 'text-center',
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "등록자", field: "regId" , width: 100, cellClass: 'text-center'}
+		
+	];
+	
+	// Get GridOptions
+	var gridOptions = gagaAgGrid.getGridOptions(columnDefs);
+
+	// 중복 선택 가능
+	gridOptions.rowSelection = 'multiple';
+ 	gridOptions.suppressRowClickSelection = true;
+	//gridOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
+	
+	// Row Click
+	gridOptions.onCellClicked = function(event) {
+		var goodsCd = event.data.goodsCd;
+		if (event.colDef.field == "goodsCd"){
+			cfnOpenGoodsDetailPopup('U',goodsCd);
+		}
+	}
+	
+	gridOptions.excelStyles = [
+			{
+				id: 'text-center',
+				dataType: 'string',
+				font: {size : 10, bold: false}
+			},
+			{
+				id: 'text-left',
+				dataType: 'string',
+				font: {size : 10, bold: false}
+			},
+			{
+				id: 'text-right',
+				font: {size : 10, bold: false}
+			}
+		]
+		
+	// 초기화 클릭시
+	$('#btnInit').on('click', function() {
+		fnInit();
+	});
+	
+	var fnInit = function(){
+		$('#goodsPriceHstForm')[0].reset();
+		//$("#goodsPriceHstForm input[type=radio]").removeClass("checked");
+		$("#goodsPriceHstForm input[type=checkbox]").removeClass("checked");
+		//$("#goodsPriceHstForm input[type=radio]").parent("label").removeClass("checked");
+		$("#goodsPriceHstForm input[type=checkbox]").parent("label").removeClass("checked");
+		$("#goodsPriceHstForm input[type=radio][checked]").parent("label").addClass("checked");
+	}
+	
+	// 조회클릭시
+	$('#btnSearch').on('click', function() {
+		fnGoodsPriceHstListSearch('N');
+	});
+
+	// 미승인목록 조회클릭시
+	$('#btnConfirmSearch').on('click', function() {
+		fnGoodsPriceHstListSearch('Y');
+	});
+	
+	// 조회
+	var fnGoodsPriceHstListSearch = function(confirmY) {
+		
+		$("#goodsPriceHstForm input[name=confirmY]").val(confirmY);
+		
+		if(!fnConditionCheck()) return;
+		
+		var formId = "#goodsPriceHstForm";
+		gagaAgGrid.fetch($(formId).prop('action'), gridOptions, formId);
+	}
+
+	//검색 조건 확인
+	var fnConditionCheck = function(){
+		var formId = '#goodsPriceHstForm';
+		var form = document.goodsPriceHstForm;
+
+		if ($("#goodsPriceHstForm input[name=confirmY]").val() == "Y") return true;
+		
+		var searchFlag = false;
+		var cnt = 0;
+
+		/* if( !gagajf.isNull($("#goodsPriceHstForm select[name=supplyCompCd]").val())
+				|| !gagajf.isNull($("#goodsPriceHstForm input[name=condition]").val())
+				|| (!gagajf.isNull($("#goodsPriceHstForm input[name=stDate]").val()) && !gagajf.isNull($("#goodsPriceHstForm input[name=edDate]").val()))
+			){
+			searchFlag = true;
+		}else{ */
+			for (i = 0; i < form.elements.length; i++ ) {
+				var el = form.elements[i];
+				
+				if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "dateGbn")) {
+					if (!(el.value == null || el.value == "")) {
+						cnt++;
+					}
+				}
+			}
+			
+			if(cnt > 0) searchFlag = true;
+			
+		/* } */
+		
+		if(searchFlag == false){
+			mcxDialog.alert("검색조건을 입력하세요.");
+			return false;
+		}
+		return true;
+	}
+	
+	//업체변경시
+	$('#goodsPriceHstForm select[name=supplyCompCd]').on('change', function() {
+		var actionUrl = '/renderer/supplyCompany/brand/list/' + $(this).val();
+
+		if(sessRoleCd == "G001_A1001"){
+			actionUrl = '/renderer/brand/AuthBrandlist';
+		}
+		$("#goodsPriceHstForm select[name=brandCd] option:gt(0)").remove();
+
+		cfnCreateCombo(actionUrl, $('#goodsPriceHstForm select[name=brandCd]'), "[전체]", "");
+		
+	});
+	
+	//브랜드 변경시
+	$('#goodsPriceHstForm select[name=brandCd]').on('change', function() {
+		
+		var supplyCompCd = $('#goodsPriceHstForm select[name=supplyCompCd]').val();
+		var brandCd = $('#goodsPriceHstForm select[name=brandCd]').val();
+		$("#goodsPriceHstForm select[name=sellStoreCd] option:gt(0)").remove();
+		if (!gagajf.isNull(brandCd)){
+			var url = "/renderer/extmall/sellstore/list/"+supplyCompCd+"/"+brandCd+"/";
+			cfnCreateCombo(url, $('#goodsPriceHstForm select[name=sellStoreCd]'), "[전체]", "");	
+		}
+		
+	});
+	
+	// 승인 클릭 시
+	$('#btnSaveGoodsPriceConfirm').on('click', function() {
+		
+		if ($("#goodsPriceHstForm input[name=confirmY]").val() != "Y"){
+			mcxDialog.alert("미승인목록 조회후 승인하세요.");
+			return false;
+		}
+		
+		var selectedData = gagaAgGrid.selectedRowData(gridOptions);
+		
+		if (selectedData.length == 0) {
+			mcxDialog.alert('선택된 행이 없습니다.');
+			return;
+		}
+
+		mcxDialog.confirm('승인 하시겠습니까?',{
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function(){
+				var jsonData = JSON.stringify(selectedData);
+				gagajf.ajaxJsonSubmit('/goods/price/hst/save', jsonData, fnSaveGoodsPriceConfirmCollBack); 
+			}
+		});
+	});	
+	
+	var fnSaveGoodsPriceConfirmCollBack = function(){
+		fnGoodsPriceHstListSearch('Y');
+	}
+	
+	$(document).ready(function() {
+		
+		cfnCreateCalendar('#sellTerms', 'stDate', 'edDate', true, '등록일', 'X');
+
+		var selectCode = '<select  name="dateGbn" id="dateGbn">';
+		selectCode += '<option value="R" seledted>가격변경일</option>';
+		selectCode += '<option value="P">승인일자</option>';
+		selectCode += '</select>';
+		
+		$("#goodsPriceHstForm").find('#sellTerms').prepend(selectCode);
+		
+		
+		if(sessRoleCd == "G001_A101") {
+			$("#goodsPriceHstForm select[name=supplyCompCd]").val([[${sessionInfo.supplyCompCd}]]);
+			$("#goodsPriceHstForm select[name=supplyCompCd]").attr("disabled", true);
+			$("select[disabled]").addClass("formControl");
+			var actionUrl = '/renderer/brand/AuthBrandlist';
+			cfnCreateCombo(actionUrl, $('#goodsPriceHstForm select[name=brandCd]'), "[전체]");
+		}
+		
+		// Create a agGrid
+		gagaAgGrid.createGrid('gridList', gridOptions);
+
+	});
+
+/*]]>*/
+</script>
+ 	</div>
+
+</html>