Przeglądaj źródła

주문서 배송정보 없을때 수정

tsit14 5 lat temu
rodzic
commit
aebfc47936

+ 8 - 2
src/main/webapp/WEB-INF/views/mob/order/OrderDeliveryAddrInfoMob.html

@@ -43,8 +43,8 @@
 			</div>
 			<div class="fold_cont">
 				<!-- 배송지 정보 변경가능 -->
-				<div class="ship_info ship_edit">
-					<button type="button" id="btn_adrsChange_pop" class="btn_popup">
+				<div class="ship_info ship_edit exist">
+					<button type="button" class="btn_popup btn_adrsChange_pop">
 						<span>배송지 변경</span>
 					</button>
 					<dl>
@@ -109,6 +109,12 @@
 					</dl>
 				</div>
 				<!-- //배송지 정보 변경가능 -->
+				
+				<!-- 210428_추가 : 배송지 정보가 없을 경우 -->
+				<div class="ship_info none">
+					<button type="button" class="btn_popup btn_adrsChange_pop"><span>배송지 변경</span></button>
+					<p>배송지 정보를 등록해 주세요.</p>
+				</div> 
 			</div>
 		</li>
 	</ul>

+ 10 - 1
src/main/webapp/WEB-INF/views/mob/order/OrderFormMob.html

@@ -589,6 +589,15 @@ var deliveryAddrInfoSet = function(delvObj, temp) {
 			$("#deliveryAddrInfo").css("display", "block");
 			$("#deliveryAddrInfo").html(result);
 			
+			// 2021.05.16 배송정보가 있으면 노출
+			if ($("#orderForm input[name='recipZipcode']").val() != "00000") {
+				$("#orderForm .ship_info.exist").show();
+				$("#orderForm .ship_info.none").hide();
+			} else {
+				$("#orderForm .ship_info.exist").hide();
+				$("#orderForm .ship_info.none").show();
+			}
+			
 			// 배송정보설정
 			$("#orderAmtForm .recipNm").text($("#orderForm input[name='recipNm']").val());
 			$("#orderAmtForm .recipPhnno").text($("#orderForm input[name='recipPhnno']").val());
@@ -599,7 +608,7 @@ var deliveryAddrInfoSet = function(delvObj, temp) {
 
 			// 2. 버튼기능구현
 			// 2.1 회원 배송지변경 팝업열기
-			$('#btn_adrsChange_pop').on("click", function(){
+			$('#orderForm .btn_adrsChange_pop').on("click", function(){
 				// 회원인경우
 				if (isLogin == true) {
 					$.ajax( {

+ 17 - 40
src/main/webapp/WEB-INF/views/web/order/OrderDeliveryAddrInfoWeb.html

@@ -38,44 +38,7 @@
 	</a>
 </div>
 <div class="fold_cont" style="display: none;">
-	<!-- 
-	<div class="area_receiveinfo">
-		<dl>
-			<div>
-				<dt><span class="sr-only">배송지명</span></dt>
-				<dd>
-					홍길동
-					<span class="icon_tag">
-						<em class="tag">기본 배송지</em>
-						<em class="tag primary_line">총알배송</em>
-					</span>
-				</dd>
-			</div>
-			<div>
-				<dt><span class="sr-only">휴대폰 번호</span></dt>
-				<dd>
-					010-1234-5647
-				</dd>
-			</div>
-			<div>
-				<dt><span class="sr-only">배송주소</span></dt>
-				<dd>
-					서울시 영등포구 은행로 11,8층(여의도동,일신빌딩)
-					<button type="button" class="btn btn_default btn_sm" id="btn_adrsChange_pop"><span>배송지 변경</span></button>
-				</dd>
-			</div>
-			<div>
-				<dt>배송요청 사항</dt>
-				<dd>
-					직접받고 부재 시 문앞
-					<button type="button" class="btn_underline" id="btn_rqstModify_pop"><span>변경하기</span></button>
-				</dd>
-			</div>
-		</dl>
-	</div>
-	 -->
-
-	<div class="area_receiveinfo">
+	<div class="area_receiveinfo exist">
 		<dl>
 			<div>
 				<dt><span class="sr-only">배송지명</span></dt>
@@ -93,12 +56,12 @@
 				<dt><span class="sr-only">배송주소</span></dt>
 				<dd>
 					<th:block th:if="${deliveryAddrInfo.recipZipcode} == '00000'">
-						배송지 정보를 등록해 주세요.
+						배송지를 등록해 주세요.
 					</th:block>
 					<th:block th:if="${deliveryAddrInfo.recipZipcode} != '00000'">
 						<th:block th:text="${deliveryAddrInfo.recipBaseAddr} + '    ' + ${deliveryAddrInfo.recipDtlAddr}"></th:block>
 					</th:block>
-					<button type="button" class="btn btn_default btn_sm" id="btn_adrsChange_pop">
+					<button type="button" class="btn btn_default btn_sm btn_adrsChange_pop">
 						<span>배송지 변경</span>
 					</button>
 				</dd>
@@ -125,6 +88,20 @@
 		</dl>
 	</div>
 	
+	<!-- 배송지정보가 없을때 노출 -->
+	<div class="area_receiveinfo none" style="display:none">
+		<dl>
+			<div>
+				<dt><span class="sr-only">배송지를 등록해 주세요.</span></dt>
+				<dd>
+					배송지 정보를 등록해 주세요.
+					<button type="button" class="btn btn_default btn_sm btn_adrsChange_pop"><span>배송지 변경</span></button>
+				</dd>
+			</div>
+		</dl>
+	</div>
+	<!-- 배송지정보가 있을때 노출 -->
+	
 	<!-- 해외배송상품일 경우 노출 -->
 	<th:block th:if="${order.foreignBuyYn} == 'Y'">
 		<div class="area_overseas">

+ 10 - 1
src/main/webapp/WEB-INF/views/web/order/OrderFormWeb.html

@@ -582,6 +582,15 @@ var deliveryAddrInfoSet = function(delvObj, temp) {
 			$("#deliveryAddrInfo").css("display", "block");
 			$("#deliveryAddrInfo").html(result);
 			
+			// 2021.05.16 배송정보가 있으면 노출
+			if ($("#orderForm input[name='recipZipcode']").val() != "00000") {
+				$("#orderForm .area_receiveinfo.exist").show();
+				$("#orderForm .area_receiveinfo.none").hide();
+			} else {
+				$("#orderForm .area_receiveinfo.exist").hide();
+				$("#orderForm .area_receiveinfo.none").show();
+			}
+			
 			// 배송정보설정
 			$("#orderAmtForm .recipNm").text($("#orderForm input[name='recipNm']").val());
 			$("#orderAmtForm .recipPhnno").text($("#orderForm input[name='recipPhnno']").val());
@@ -592,7 +601,7 @@ var deliveryAddrInfoSet = function(delvObj, temp) {
 			
 			// 2. 버튼기능구현
 			// 2.1 회원 배송지변경 팝업열기
-			$('#btn_adrsChange_pop').on("click", function(){
+			$('#orderForm .btn_adrsChange_pop').on("click", function(){
 				// 회원인경우
 				if (isLogin == true) {
 					$.ajax( {