فهرست منبع

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.admin.git into develop

tsit05 4 سال پیش
والد
کامیت
2090fda476

+ 10 - 0
src/main/java/com/style24/admin/biz/dao/TsaGoodsDao.java

@@ -1380,4 +1380,14 @@ public interface TsaGoodsDao {
 	 * @since 2021. 07. 14
 	 */
 	void deleteGoodsContentGoods(GoodsContentsData goodsContentsData);
+	
+	/**
+	 * 상품 상태만 변경
+	 *
+	 * @param goods
+	 * @return
+	 * @author jmh
+	 * @since 2021. 08. 05
+	 */
+	void updateGoodsStatOnly(Goods goods);
 }

+ 11 - 0
src/main/java/com/style24/admin/biz/service/TsaGoodsService.java

@@ -2691,6 +2691,7 @@ public class TsaGoodsService {
 	@Transactional("shopTxnManager")
 	public void saveGoodsImageList(Collection<GoodsImg> goodsImgList) {
 		int index = 0;
+		Goods goods;
 		for (GoodsImg goodsImg : goodsImgList) {
 			// 상품이미지 전체 삭제
 			if (index++ == 0) {
@@ -2702,6 +2703,16 @@ public class TsaGoodsService {
 				goodsImg.setRegNo(TsaSession.getInfo().getUserNo());
 				goodsDao.createGoodsImage(goodsImg);
 			}
+			
+			// "정보부족"인 상태의 상품 중 기본이미지가 생성될 경우 승인대기상태로 변경
+			if (goodsImg.getMode().equals("C") && goodsImg.getDefaultImgYn().equals("Y")) {
+				goods = new Goods();
+				goods.setChGoodsStatYn("Y");
+				goods.setGoodsCd(goodsImg.getGoodsCd());
+				goods.setGoodsStat("G008_40");
+				goods.setUpdNo(TsaSession.getInfo().getUserNo());
+				goodsDao.updateGoodsStatOnly(goods);
+			}
 		}
 	}
 

+ 14 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -5292,4 +5292,18 @@
 		WHERE  GOODS_CONTENTS_SQ = #{goodsContentsSq}
 	</update>
 	
+	<!-- 상품 상태만 변경 -->
+	<update id="updateGoodsStatOnly" parameterType="Goods">
+		/* TsaGoods.updateGoodsStatOnly */
+		UPDATE TB_GOODS 
+		SET GOODS_STAT= #{goodsStat}
+		  , UPD_NO = #{updNo}
+		  , UPD_DT = NOW() 
+		WHERE GOODS_CD = #{goodsCd}
+		
+		<if test='chGoodsStatYn != null and chGoodsStatYn == "Y"'>
+		  AND GOODS_STAT = 'G008_20'
+		</if>
+	</update>
+	
 </mapper>

+ 30 - 0
src/main/webapp/WEB-INF/views/marketing/SocialShoppingListForm.html

@@ -470,6 +470,9 @@
 		$(formId + ' select[name=planSq]').removeAttr("disabled");
 		$(formId + ' select[name=socialType]').removeAttr("disabled");
 		$(formId + ' button[id=btnSearchPlan]').removeAttr("style");
+		
+		// 대기상태로 세팅
+		$("input[name=applyGb]").val("P");
 
 	};
 	// 소셜 기본정보 저장
@@ -531,13 +534,40 @@
 	
 	// 소셜 저장
 	var fnSocialSave = function(msg) {
+		
 		mcxDialog.confirm(msg +' 하시겠습니까?', {
 			cancelBtnText: "취소",
 			sureBtnText: "확인",
 			sureBtnClick: function() {
+				
+				var formId = '#detailForm';
+				// 서버전송시 임시해제
+				if("P" == $("input[name=applyGb]").val()){
+					if( "" == $("#detailForm input[name=socialSq]").val()){	// 신규등록
+						$(formId + ' select[name=useYn]').attr('disabled', false);
+					}
+				}else if("A" == $("input[name=applyGb]").val()){
+					$(formId+ " input").prop("disabled", false);
+					$(formId+ " select").prop("disabled", false);
+				}
+				
 				var actionUrl = '/marketing/social/save';
 				gagajf.ajaxFormSubmit(actionUrl, '#detailForm', function() {
 					fnSearch();
+					
+					// 전송완료 후 원래 상태값으로 변경 
+					if("P" == $("input[name=applyGb]").val()){
+						if( "" == $("#detailForm input[name=socialSq]").val()){	// 신규등록
+							$(formId + ' select[name=useYn]').attr('disabled', true);
+						}
+					}else if("A" == $("input[name=applyGb]").val()){
+						$(formId+ " input").prop("disabled", true);
+						$(formId+ " select").prop("disabled", true);
+						$(formId + ' input[name=edDate]').attr('readonly', false);
+						$(formId + ' input[name=edDate]').prop('disabled', false);
+						$(formId + ' #edTimeHour').prop('disabled', false);
+						$(formId + ' #edTimeHour').attr('readonly', false);
+					}
 				});
 			}
 		});

+ 2 - 0
src/main/webapp/WEB-INF/views/order/RtnReqForm.html

@@ -327,6 +327,8 @@ var recallExceptionInfo		= [[${recallExceptionInfo}]];					// 회수 예외 정
 var rtnLocInfo				= [[${rtnLocInfo}]];							// 반송지주소정보
 var payGb 					= orderInfoList[0].payGb;						// 결제수단
 var payMeans 				= orderInfoList[0].payMeans;					// 결제방법
+var payMeansNm 				= orderInfoList[0].payMeansNm;					// 결제방법명
+var cardNm 					= orderInfoList[0].cardNm;						// 결제카드명
 var pgGb					= orderInfoList[0].pgGb;						// PG구분
 var selfGoodsYn 			= cancelRequestTargetList[0].selfGoodsYn;		// 자사,입점여부
 var chgReason				= "";											// 변경사유코드