Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -52,6 +52,9 @@ public interface BOMaMtngMapper {
|
|||||||
/** 주문 전 쿠폰정보 재확인*/
|
/** 주문 전 쿠폰정보 재확인*/
|
||||||
public List<String> selectBOPreOrderValidationCouponList(BOPreOrderValidVO goods);
|
public List<String> selectBOPreOrderValidationCouponList(BOPreOrderValidVO goods);
|
||||||
|
|
||||||
|
/** 구독서비스 주문 전 주문정보 재확인*/
|
||||||
|
public List<DataMap> selectBOSubsvcPreOrderValidation(BOPreOrderValidVO goods);
|
||||||
|
|
||||||
/*쇼핑몰 구매요청 재검증 확인 여부*/
|
/*쇼핑몰 구매요청 재검증 확인 여부*/
|
||||||
public String selectPurchsValidUseAt(String sopmalCd);
|
public String selectPurchsValidUseAt(String sopmalCd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -306,8 +306,12 @@ public class BOMaMtngService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(BOPreOrderValidVO goods : goodsList) {
|
for(BOPreOrderValidVO goods : goodsList) {
|
||||||
|
List<DataMap> resultValid = new ArrayList<>();
|
||||||
List<DataMap> resultValid = mapper.selectBOPreOrderValidation(goods);
|
if(goods.getSubsvcInnb() != "") {
|
||||||
|
resultValid = mapper.selectBOSubsvcPreOrderValidation(goods);
|
||||||
|
} else {
|
||||||
|
resultValid = mapper.selectBOPreOrderValidation(goods);
|
||||||
|
}
|
||||||
|
|
||||||
//구매정보 변경대상 필터링
|
//구매정보 변경대상 필터링
|
||||||
// 값이 1인 항목 == 변경항목
|
// 값이 1인 항목 == 변경항목
|
||||||
@@ -473,12 +477,14 @@ public class BOMaMtngService {
|
|||||||
goodsList.forEach(goods -> {
|
goodsList.forEach(goods -> {
|
||||||
|
|
||||||
String goodsInnb = StringUtil.isNullToString(goods.get("goodsInnb"));
|
String goodsInnb = StringUtil.isNullToString(goods.get("goodsInnb"));
|
||||||
|
String subsvcInnb = StringUtil.isNullToString(goods.get("subsvcInnb"));
|
||||||
|
|
||||||
//상품별 수량합계
|
//상품별 수량합계
|
||||||
int goodsTotalQy = 0;
|
int goodsTotalQy = 0;
|
||||||
if(qySums.containsKey(goodsInnb)){
|
if(qySums.containsKey(goodsInnb)){
|
||||||
goodsTotalQy = qySums.getOrDefault(goodsInnb, 0);
|
goodsTotalQy = qySums.getOrDefault(goodsInnb, 0);
|
||||||
|
} else if (qySums.containsKey(subsvcInnb)) {
|
||||||
|
goodsTotalQy = qySums.getOrDefault(subsvcInnb, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -514,6 +520,7 @@ public class BOMaMtngService {
|
|||||||
.sopmalCd(StringUtil.isNullToString(goods.get("sopmalCd")))
|
.sopmalCd(StringUtil.isNullToString(goods.get("sopmalCd")))
|
||||||
.goodsInnb(StringUtil.isNullToString(goods.get("goodsInnb")))
|
.goodsInnb(StringUtil.isNullToString(goods.get("goodsInnb")))
|
||||||
.goodsOptnInnb(StringUtil.isNullToString(goods.get("goodsOptnInnb")))
|
.goodsOptnInnb(StringUtil.isNullToString(goods.get("goodsOptnInnb")))
|
||||||
|
.subsvcInnb(StringUtil.isNullToString(goods.get("subsvcInnb")))
|
||||||
.mbrInnb(StringUtil.isNullToString(goods.get("mbrInnb")))
|
.mbrInnb(StringUtil.isNullToString(goods.get("mbrInnb")))
|
||||||
.mbrDvCd(StringUtil.isNullToString(goods.get("mbrDvCd")))
|
.mbrDvCd(StringUtil.isNullToString(goods.get("mbrDvCd")))
|
||||||
.qy(StringUtil.isNullToString(goods.get("qy")))
|
.qy(StringUtil.isNullToString(goods.get("qy")))
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ public class BOPreOrderValidVO {
|
|||||||
/*상품옵션고유번호*/
|
/*상품옵션고유번호*/
|
||||||
private String goodsOptnInnb;
|
private String goodsOptnInnb;
|
||||||
|
|
||||||
|
/*구독서비스고유번호*/
|
||||||
|
private String subsvcInnb;
|
||||||
|
|
||||||
/*회원고유번호*/
|
/*회원고유번호*/
|
||||||
private String mbrInnb;
|
private String mbrInnb;
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import java.math.BigInteger;
|
|||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -569,7 +570,7 @@ public class BOOrderService {
|
|||||||
/* ***********************************
|
/* ***********************************
|
||||||
4. 주문상품 등록(GC_ORDER_ITEM)
|
4. 주문상품 등록(GC_ORDER_ITEM)
|
||||||
*********************************** */
|
*********************************** */
|
||||||
List<BOOrderItemVO> insertedGoodsList = insertOrdrGoods(sopmalCd, "01", ordrInnb, goodsList);
|
List<BOOrderItemVO> insertedGoodsList = insertOrdrGoods(sopmalCd, "01", ordrInnb, goodsList, subsvcAt);
|
||||||
|
|
||||||
BOOrderShippingVO shippingEscrowVO = new BOOrderShippingVO();
|
BOOrderShippingVO shippingEscrowVO = new BOOrderShippingVO();
|
||||||
if ("01".equals(ordrTyCd) || "03".equals(ordrTyCd) || "04".equals(ordrTyCd) || "06".equals(ordrTyCd)) { // 일반주문, 회원 개인결제, 정기배송
|
if ("01".equals(ordrTyCd) || "03".equals(ordrTyCd) || "04".equals(ordrTyCd) || "06".equals(ordrTyCd)) { // 일반주문, 회원 개인결제, 정기배송
|
||||||
@@ -869,8 +870,17 @@ public class BOOrderService {
|
|||||||
int goodsOptnInnb = (int) goods.get("goodsOptnInnb");
|
int goodsOptnInnb = (int) goods.get("goodsOptnInnb");
|
||||||
int ordrQy = (int) goods.get("qy");
|
int ordrQy = (int) goods.get("qy");
|
||||||
|
|
||||||
BOOrderItemVO orderItemVO = insertedGoodsList.stream().filter(obj-> Objects.equals(ordrInnb, obj.getOrdrInnb()) &&
|
List<BOOrderItemVO> orderItemVOList = insertedGoodsList.stream().filter(obj-> Objects.equals(ordrInnb, obj.getOrdrInnb()) &&
|
||||||
Objects.equals(BigInteger.valueOf(goodsInnb), obj.getGoodsInnb())).findAny().orElse(null);
|
Objects.equals(BigInteger.valueOf(goodsInnb), obj.getGoodsInnb())).toList();
|
||||||
|
BOOrderItemVO orderItemVO = new BOOrderItemVO();
|
||||||
|
// 구독서비스 여부(subsvcAt)에 따라 주문상품 취급 방식 분기
|
||||||
|
if(subsvcAt) {
|
||||||
|
// 구독서비스 : 동일 상품이라도 순번에 따라 개별 옵션 유지
|
||||||
|
orderItemVO = orderItemVOList.size() > allGoodsCount ? orderItemVOList.get(allGoodsCount) : null;
|
||||||
|
} else {
|
||||||
|
// 일반 주문 : 동일 상품과 옵션은 하나로 병합하여 처리
|
||||||
|
orderItemVO = orderItemVOList.stream().findAny().orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
/* ***********************************************
|
/* ***********************************************
|
||||||
6. 주문 상품 옵션 정보 등록(GC_ORDER_ITEM_OPTION)
|
6. 주문 상품 옵션 정보 등록(GC_ORDER_ITEM_OPTION)
|
||||||
@@ -1051,7 +1061,14 @@ public class BOOrderService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<BOOrderItemVO> insertOrdrGoods(String sopmalCd, String goodsKndCd, BigInteger ordrInnb, List<LinkedHashMap> goodsList) {
|
public List<BOOrderItemVO> insertOrdrGoods(String sopmalCd, String goodsKndCd, BigInteger ordrInnb, List<LinkedHashMap> goodsList) {
|
||||||
List<Integer> goodsInnbList = (goodsList.stream().map(obj-> (int) obj.get("goodsInnb")).toList()).stream().distinct().toList(); // 상품번호 목록(중복제거)
|
return insertOrdrGoods(sopmalCd, goodsKndCd, ordrInnb, goodsList, false);
|
||||||
|
}
|
||||||
|
public List<BOOrderItemVO> insertOrdrGoods(String sopmalCd, String goodsKndCd, BigInteger ordrInnb, List<LinkedHashMap> goodsList, Boolean subsvcAt) {
|
||||||
|
Stream<Integer> goodsInnbstream = goodsList.stream().map(obj -> (int) obj.get("goodsInnb"));
|
||||||
|
if(!subsvcAt) // 상품번호 목록(중복제거)
|
||||||
|
goodsInnbstream = goodsInnbstream.distinct();
|
||||||
|
List<Integer> goodsInnbList = goodsInnbstream.toList();
|
||||||
|
|
||||||
boolean tmAt = goodsList.stream().anyMatch(map -> map.containsKey("tmAt")); //tm주문 여부
|
boolean tmAt = goodsList.stream().anyMatch(map -> map.containsKey("tmAt")); //tm주문 여부
|
||||||
List<BOOrderItemVO> insertedGoodsList = new ArrayList<>(); // 주문상품 목록
|
List<BOOrderItemVO> insertedGoodsList = new ArrayList<>(); // 주문상품 목록
|
||||||
|
|
||||||
|
|||||||
@@ -30,4 +30,13 @@ public interface BOSubsvcMapper {
|
|||||||
void insertBOMngrSubsvc(BOSubsvcVO vo);
|
void insertBOMngrSubsvc(BOSubsvcVO vo);
|
||||||
/** 관리자 구독서비스 명 중복체크*/
|
/** 관리자 구독서비스 명 중복체크*/
|
||||||
int selectBOMngrSubsvcNmDupCheck(BOSubsvcVO vo);
|
int selectBOMngrSubsvcNmDupCheck(BOSubsvcVO vo);
|
||||||
|
|
||||||
|
/** 구독서비스 주문에 따른 판매재고수량 수정*/
|
||||||
|
public void updateSubsvcOrdrUsefulInvntryQy(BOSubsvcVO vo);
|
||||||
|
/** 구독서비스 환불에 따른 판매재고수량 수정*/
|
||||||
|
public void updateSubsvcRefundUsefulInvntryQy(BOSubsvcVO vo);
|
||||||
|
/** 구독서비스 주문취소에 따른 판매재고수량 수정*/
|
||||||
|
public void updateSubsvcCancelOrderUsefulInvntryQy(BOSubsvcVO vo);
|
||||||
|
/** 판매재고수량 변경에 따른 구독서비스 상태 수정*/
|
||||||
|
public void updateInvntryPolicySubsvcSttusChng(BOSubsvcVO vo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
package com.wb.domainserver.domain.gcone.goods.subsvc.service;
|
package com.wb.domainserver.domain.gcone.goods.subsvc.service;
|
||||||
|
|
||||||
import com.wb.domainserver.domain.gcone.goods.goodsinfo.vo.BOGoodsInfoVO;
|
|
||||||
import com.wb.domainserver.domain.gcone.goods.subsvc.mapper.BOSubsvcMapper;
|
import com.wb.domainserver.domain.gcone.goods.subsvc.mapper.BOSubsvcMapper;
|
||||||
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
import com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrVO;
|
||||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import io.micrometer.common.util.StringUtils;
|
import io.micrometer.common.util.StringUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -137,4 +139,51 @@ public class BOSubsvcService {
|
|||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 주문에 따른 판매재고수량 수정
|
||||||
|
* @param ordrVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
public void updateSubsvcOrdrUsefulInvntryQy(BOOrdrVO ordrVO) throws Exception {
|
||||||
|
BOSubsvcVO subsvcVO = new BOSubsvcVO();
|
||||||
|
BeanUtils.copyProperties(ordrVO, subsvcVO);
|
||||||
|
|
||||||
|
//판매수량 수정
|
||||||
|
mapper.updateSubsvcOrdrUsefulInvntryQy(subsvcVO);
|
||||||
|
//구독서비스 상태 수정
|
||||||
|
mapper.updateInvntryPolicySubsvcSttusChng(subsvcVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 환불에 따른 판매재고수량 수정
|
||||||
|
* @param ordrVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
public void updateSubsvcRefundUsefulInvntryQy(BOOrdrVO ordrVO) throws Exception {
|
||||||
|
BOSubsvcVO subsvcVO = new BOSubsvcVO();
|
||||||
|
BeanUtils.copyProperties(ordrVO, subsvcVO);
|
||||||
|
|
||||||
|
//판매수량 수정
|
||||||
|
mapper.updateSubsvcRefundUsefulInvntryQy(subsvcVO);
|
||||||
|
//구독서비스 상태 수정
|
||||||
|
mapper.updateInvntryPolicySubsvcSttusChng(subsvcVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 주문취소에 따른 판매재고수량 수정
|
||||||
|
* @param ordrVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
public void updateSubsvcCancelOrderUsefulInvntryQy(BOOrdrVO ordrVO) throws Exception {
|
||||||
|
BOSubsvcVO subsvcVO = new BOSubsvcVO();
|
||||||
|
BeanUtils.copyProperties(ordrVO, subsvcVO);
|
||||||
|
|
||||||
|
//판매수량 수정
|
||||||
|
mapper.updateSubsvcCancelOrderUsefulInvntryQy(subsvcVO);
|
||||||
|
//구독서비스 상태 수정
|
||||||
|
mapper.updateInvntryPolicySubsvcSttusChng(subsvcVO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigInteger;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -12,14 +13,14 @@ public class BOSubsvcVO extends AbstractVO {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 구독서비스고유번호 */
|
|
||||||
private String subsvcInnb;
|
|
||||||
/** 쇼핑몰코드 */
|
/** 쇼핑몰코드 */
|
||||||
private String sopmalCd;
|
private String sopmalCd;
|
||||||
/** 구독서비스명 */
|
/** 구독서비스명 */
|
||||||
private String subsvcNm;
|
private String subsvcNm;
|
||||||
/** 구독기간 */
|
/** 구독기간 */
|
||||||
private String subPd;
|
private String subPd;
|
||||||
|
/** 구독서비스고유번호 */
|
||||||
|
private String subsvcInnb;
|
||||||
/** 구독서비스기수 */
|
/** 구독서비스기수 */
|
||||||
private String subsvcGnr;
|
private String subsvcGnr;
|
||||||
/** 구독서비스명 다음기수 */
|
/** 구독서비스명 다음기수 */
|
||||||
@@ -108,6 +109,8 @@ private static final long serialVersionUID = 1L;
|
|||||||
private Integer mbrInnb;
|
private Integer mbrInnb;
|
||||||
/** 회원구분코드 */
|
/** 회원구분코드 */
|
||||||
private String mbrDvCd;
|
private String mbrDvCd;
|
||||||
|
/** 주문고유번호 */
|
||||||
|
private String ordrInnb;
|
||||||
|
|
||||||
|
|
||||||
/** 결제상품정보 */
|
/** 결제상품정보 */
|
||||||
|
|||||||
@@ -6017,8 +6017,8 @@ public class BOOrdrService{
|
|||||||
LinkedHashMap subsvcOne = subsvcList.get(0);
|
LinkedHashMap subsvcOne = subsvcList.get(0);
|
||||||
log.debug("subsvcOne : {}", subsvcOne);
|
log.debug("subsvcOne : {}", subsvcOne);
|
||||||
|
|
||||||
goodsAmt = BigDecimal.valueOf((Integer) subsvcOne.get("selpric"));
|
goodsAmt = BigDecimal.valueOf((Integer) subsvcOne.get("slepric"));
|
||||||
setleAmt = BigDecimal.valueOf((Integer) subsvcOne.get("selpric"));
|
setleAmt = BigDecimal.valueOf((Integer) subsvcOne.get("slepric"));
|
||||||
log.debug("결제 예정 금액 : {}", setleAmt);
|
log.debug("결제 예정 금액 : {}", setleAmt);
|
||||||
|
|
||||||
// 환율계산
|
// 환율계산
|
||||||
|
|||||||
@@ -1,53 +1,45 @@
|
|||||||
package com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.service;
|
package com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.math.BigInteger;
|
|
||||||
import java.text.ParseException;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.wb.domainserver.domain.gcone.goods.goods.service.BOGoodsService;
|
import com.wb.domainserver.domain.gcone.goods.goods.service.BOGoodsService;
|
||||||
import com.wb.domainserver.domain.gcone.goods.purchs.mapper.BOPurchsMapper;
|
import com.wb.domainserver.domain.gcone.goods.purchs.mapper.BOPurchsMapper;
|
||||||
import com.wb.domainserver.domain.gcone.goods.purchs.service.BOOrderService;
|
import com.wb.domainserver.domain.gcone.goods.purchs.service.BOOrderService;
|
||||||
import com.wb.domainserver.domain.gcone.goods.purchs.vo.BOOrderLogVO;
|
import com.wb.domainserver.domain.gcone.goods.purchs.vo.BOOrderLogVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.goods.subsvc.service.BOSubsvcService;
|
||||||
import com.wb.domainserver.domain.gcone.mbr.mlg.service.BOMlgService;
|
import com.wb.domainserver.domain.gcone.mbr.mlg.service.BOMlgService;
|
||||||
import com.wb.domainserver.domain.gcone.mbr.mlg.vo.BOCashVO;
|
import com.wb.domainserver.domain.gcone.mbr.mlg.vo.BOCashVO;
|
||||||
import com.wb.domainserver.domain.gcone.mbr.mlg.vo.BOMlgVO;
|
import com.wb.domainserver.domain.gcone.mbr.mlg.vo.BOMlgVO;
|
||||||
import com.wb.domainserver.domain.gcone.ntcn.mssage.service.BOMssageService;
|
import com.wb.domainserver.domain.gcone.ntcn.mssage.service.BOMssageService;
|
||||||
import com.wb.domainserver.domain.gcone.ordr.ordr.mapper.BOOrdrMapper;
|
import com.wb.domainserver.domain.gcone.ordr.ordr.mapper.BOOrdrMapper;
|
||||||
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrdrService;
|
|
||||||
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrDlvyVO;
|
|
||||||
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrRefundVO;
|
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrRefundVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrVO;
|
||||||
import com.wb.domainserver.domain.gcone.ordr.pay.service.BOPayService;
|
import com.wb.domainserver.domain.gcone.ordr.pay.service.BOPayService;
|
||||||
import com.wb.domainserver.domain.gcone.ordr.pay.vo.BOPayVO;
|
import com.wb.domainserver.domain.gcone.ordr.pay.vo.BOPayVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.mapper.BORtngudrefndMapper;
|
||||||
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.vo.BOOrderReItemVO;
|
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.vo.BOOrderReItemVO;
|
||||||
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.vo.BORefundSetleVO;
|
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.vo.BORefundSetleVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.vo.BORtngudrefndSrchVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.vo.BORtngudrefndVO;
|
||||||
import com.wb.domainserver.domain.gcone.ordr.selngpruf.service.BOSelngprufService;
|
import com.wb.domainserver.domain.gcone.ordr.selngpruf.service.BOSelngprufService;
|
||||||
import com.wb.domainserver.domain.gcone.ordr.selngpruf.vo.BOSelngprufVO;
|
import com.wb.domainserver.domain.gcone.ordr.selngpruf.vo.BOSelngprufVO;
|
||||||
import com.wb.domainserver.domain.gcone.promtn.coupon.service.BOCouponService;
|
import com.wb.domainserver.domain.gcone.promtn.coupon.service.BOCouponService;
|
||||||
import com.wb.domainserver.domain.gcone.promtn.coupon.vo.BODwldCouponVO;
|
import com.wb.domainserver.domain.gcone.promtn.coupon.vo.BODwldCouponVO;
|
||||||
import com.wb.domainserver.domain.gcone.setup.site.mapper.BOSiteMapper;
|
import com.wb.domainserver.domain.gcone.setup.site.mapper.BOSiteMapper;
|
||||||
import com.wb.domainserver.domain.gcone.setup.site.vo.BOSetupContentsItemVO;
|
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
import com.wb.domainserver.util.string.StringUtil;
|
import com.wb.domainserver.util.string.StringUtil;
|
||||||
import lombok.Data;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.wb.domainserver.domain.admin.sys.comncd.service.BOMaComncdService;
|
|
||||||
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.mapper.BORtngudrefndMapper;
|
|
||||||
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.vo.BORtngudrefndSrchVO;
|
|
||||||
import com.wb.domainserver.domain.gcone.ordr.rtngudrefnd.vo.BORtngudrefndVO;
|
|
||||||
import com.wb.domainserver.util.dataaccess.DataMap;
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.support.WebExchangeBindException;
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -87,6 +79,9 @@ public class BORtngudrefndService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private BOOrderService orderService;
|
private BOOrderService orderService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOSubsvcService subsvcService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BORtngudrefndMapper mapper;
|
private BORtngudrefndMapper mapper;
|
||||||
|
|
||||||
@@ -1381,7 +1376,21 @@ public class BORtngudrefndService {
|
|||||||
if ("0".equals(message.get("status"))) {
|
if ("0".equals(message.get("status"))) {
|
||||||
|
|
||||||
// ########################################### 상품 재고 ###########################################
|
// ########################################### 상품 재고 ###########################################
|
||||||
boGoodsService.updateRefundUsefulInvntryQy(refundVO);
|
BOOrdrVO ordrVO = new BOOrdrVO();
|
||||||
|
ordrVO.setOrdrInnb(refundVO.getOrdrInnb());
|
||||||
|
ordrVO.setSopmalCd(refundVO.getSopmalCd());
|
||||||
|
|
||||||
|
DataMap ordrDtl = ordrMapper.selectOrdrDtl(ordrVO);
|
||||||
|
boolean subsvcAt = "Y".equals(ordrDtl.get("subsvcAt"));
|
||||||
|
// 구독서비스 여부(subsvcAt)에 따라 재고 처리 로직을 분기
|
||||||
|
if(subsvcAt) {
|
||||||
|
// 구독서비스
|
||||||
|
ordrVO.setSubsvcInnb(ordrDtl.get("subsvcInnb").toString());
|
||||||
|
subsvcService.updateSubsvcRefundUsefulInvntryQy(ordrVO);
|
||||||
|
} else {
|
||||||
|
// 일반 주문
|
||||||
|
boGoodsService.updateRefundUsefulInvntryQy(refundVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ########################################### 쿠폰 복원 ###########################################
|
// ########################################### 쿠폰 복원 ###########################################
|
||||||
@@ -1536,7 +1545,21 @@ public class BORtngudrefndService {
|
|||||||
|
|
||||||
|
|
||||||
// ########################################### 상품 재고 ###########################################
|
// ########################################### 상품 재고 ###########################################
|
||||||
boGoodsService.updateCancelOrderUsefulInvntryQy(ordrVO, ordrVO.getOrdrInnb());
|
BOOrdrVO boOrdrVO = new BOOrdrVO();
|
||||||
|
boOrdrVO.setOrdrInnb(ordrVO.getOrdrInnb());
|
||||||
|
boOrdrVO.setSopmalCd(ordrVO.getSopmalCd());
|
||||||
|
|
||||||
|
DataMap ordrDtl = ordrMapper.selectOrdrDtl(boOrdrVO);
|
||||||
|
boolean subsvcAt = "Y".equals(ordrDtl.get("subsvcAt"));
|
||||||
|
// 구독서비스 여부(subsvcAt)에 따라 재고 처리 로직을 분기
|
||||||
|
if(subsvcAt) {
|
||||||
|
// 구독서비스
|
||||||
|
boOrdrVO.setSubsvcInnb(ordrDtl.get("subsvcInnb").toString());
|
||||||
|
subsvcService.updateSubsvcCancelOrderUsefulInvntryQy(boOrdrVO);
|
||||||
|
} else {
|
||||||
|
// 일반 주문
|
||||||
|
boGoodsService.updateCancelOrderUsefulInvntryQy(ordrVO, ordrVO.getOrdrInnb());
|
||||||
|
}
|
||||||
|
|
||||||
resotreResult.put("restoreResult", "0");
|
resotreResult.put("restoreResult", "0");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -261,6 +261,143 @@ public class MyActController {
|
|||||||
|
|
||||||
return Util.getDeviceType(request)+"/mpage/act/MyGoodsQnaDtlUpdtU";
|
return Util.getDeviceType(request)+"/mpage/act/MyGoodsQnaDtlUpdtU";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일반문의 조회
|
||||||
|
* @param bbsctt
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
|
@RequestMapping(value="/selectNormalQnaInqire")
|
||||||
|
public String selectNormalQnaInqire(HttpServletRequest request, ModelMap model, BOGnrlbbscttVO bbsctt, BOMbrVO vo){
|
||||||
|
bbsctt.setBbsTyCd("01");
|
||||||
|
bbsctt.setServerDv("sopmal");
|
||||||
|
bbsctt.setReqUrl("mpage");
|
||||||
|
|
||||||
|
DataMap content = selectBOBbscttListInqire(bbsctt);
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttListInqire",bbsctt),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
|
Map<String, Object> content2 = selectBOMpageInfoInqire(vo);
|
||||||
|
// 마이페이지 > 상단 회원 정보 ( 등금, 이름, 마일리지, 쿠폰, 위시리스트, 배송중, 등급산정기준 )
|
||||||
|
model.addAttribute("mpageResultMap", content2);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMpageInfoInqire",bbsctt),
|
||||||
|
// model,
|
||||||
|
// "mpageResultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
|
return Util.getDeviceType(request)+"/mpage/act/MyNormalQaR";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일반문의 수정 폼 이동
|
||||||
|
* @param bbsctt
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
|
@RequestMapping(value="/selectNormalQnaDtlUpdtForm")
|
||||||
|
public String selectNormalQnaDtlUpdtForm(HttpServletRequest request, ModelMap model,BOGnrlbbscttVO bbsctt, BOMbrVO vo){
|
||||||
|
bbsctt.setServerDv("sopmal");
|
||||||
|
bbsctt.setBbsTyCd("01");
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
if ("01".equals(user.getSysDvCd())) {
|
||||||
|
bbsctt.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
;
|
||||||
|
if (user.getUserInnb() > 0) {
|
||||||
|
if ("mngr".equals(bbsctt.getServerDv())) {
|
||||||
|
bbsctt.setRegusrDvCd("02"); //관리자
|
||||||
|
} else {
|
||||||
|
bbsctt.setRegusrDvCd("01"); //회원
|
||||||
|
bbsctt.setAnswMbtlnb(user.getMbtlnb());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
bbsctt.setRegusrDvCd("99");//비회원
|
||||||
|
}
|
||||||
|
bbsctt.setSecretKey(boCommonService.selectSecretkey());
|
||||||
|
// 게시판 설정 정보
|
||||||
|
BOBbsVO bbsVO = new BOBbsVO();
|
||||||
|
// bbsVO에 쇼핑몰코드, 해당 게시판 set
|
||||||
|
bbsVO.setSopmalCd(bbsctt.getSopmalCd());
|
||||||
|
bbsVO.setBbsId(bbsctt.getBbsId());
|
||||||
|
bbsVO.setBbsTyCd(bbsctt.getBbsTyCd());
|
||||||
|
DataMap bbsInfo = new DataMap();
|
||||||
|
bbsInfo = bbsService.selectBOBbsSetupInfo(bbsVO);
|
||||||
|
|
||||||
|
// 게시글 상세 조회
|
||||||
|
Map<String, Object> bbscttInfo = new HashMap<String, Object>();
|
||||||
|
bbscttInfo = service.selectBOBbscttUpdt(bbsctt);
|
||||||
|
|
||||||
|
// 분류 조회
|
||||||
|
List<DataMap> itmList = new ArrayList<>();
|
||||||
|
itmList = service.selectBOBbscttItmInqire(bbsctt);
|
||||||
|
|
||||||
|
//추가 항목 조회, 추가항목 항목 조회
|
||||||
|
Map<String, Object> qesitmList = new HashMap<String, Object>();
|
||||||
|
qesitmList = service.selectBOBbscttRegistPopupForm(bbsctt);
|
||||||
|
|
||||||
|
//리뷰항목 리스트, 리뷰항목 항목 리스트
|
||||||
|
Map<String, Object> rvwQesitmList = new HashMap<String, Object>();
|
||||||
|
rvwQesitmList = service.selectBOStarItm(bbsctt);
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<String, Object>();
|
||||||
|
content.put("bbsInfo", bbsInfo);
|
||||||
|
content.put("bbscttVO", bbsctt);
|
||||||
|
content.put("bbscttInfo", bbscttInfo);
|
||||||
|
content.put("itmList", itmList);
|
||||||
|
content.put("qesitmList", qesitmList);
|
||||||
|
content.put("rvwQesitmList", rvwQesitmList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttUpdtPopupForm",bbsctt),
|
||||||
|
// model,
|
||||||
|
// "resultMap"
|
||||||
|
// );
|
||||||
|
model.addAttribute("bbsctt", bbsctt);
|
||||||
|
|
||||||
|
// 마이페이지 > 상단 회원 정보 ( 등금, 이름, 마일리지, 쿠폰, 위시리스트, 배송중, 등급산정기준 )
|
||||||
|
Map<String, Object> content2 = selectBOMpageInfoInqire(vo);
|
||||||
|
model.addAttribute("mpageResultMap", content2);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/mbr/mbr/selectBOMpageInfoInqire",bbsctt),
|
||||||
|
// model,
|
||||||
|
// "mpageResultMap"
|
||||||
|
// );
|
||||||
|
|
||||||
|
return Util.getDeviceType(request)+"/mpage/act/MyNormalQnaDtlUpdtU";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일반문의 ajax 조회
|
||||||
|
* @param bbsctt
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
|
@RequestMapping(value="/selectNormalQnaInqireAjax", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
public ResponseEntity<?> selectNormalQnaInqireAjax(BOGnrlbbscttVO bbsctt){
|
||||||
|
bbsctt.setBbsTyCd("01");
|
||||||
|
bbsctt.setServerDv("sopmal");
|
||||||
|
bbsctt.setReqUrl("mpage");
|
||||||
|
//게시글 노출 항목 설정값과 게시판 목록 조회
|
||||||
|
|
||||||
|
DataMap content = selectBOBbscttListInqire(bbsctt);
|
||||||
|
return ResponseEntity.ok(
|
||||||
|
WnbtResponse.builder()
|
||||||
|
.resBody(new WnbtResponseBody(content))
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
// return responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/bbs/gnrlbbsctt/selectBOBbscttListInqire",bbsctt),
|
||||||
|
// ReplyFromResrc::getReply
|
||||||
|
// );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1:1 문의 조회
|
* 1:1 문의 조회
|
||||||
* @param bbsctt
|
* @param bbsctt
|
||||||
|
|||||||
@@ -797,6 +797,7 @@ public class OrdrController {
|
|||||||
|
|
||||||
LinkedHashMap goodsOne = ((List<LinkedHashMap>) paramData.get("goodsList")).get(0);
|
LinkedHashMap goodsOne = ((List<LinkedHashMap>) paramData.get("goodsList")).get(0);
|
||||||
Boolean subsvcAt = goodsOne.containsKey("subsvcInnb");
|
Boolean subsvcAt = goodsOne.containsKey("subsvcInnb");
|
||||||
|
// 구독서비스에 포함된 상품 목록 세팅
|
||||||
if(subsvcAt) {
|
if(subsvcAt) {
|
||||||
model.addAttribute("subsvcInnb", goodsOne.get("subsvcInnb"));
|
model.addAttribute("subsvcInnb", goodsOne.get("subsvcInnb"));
|
||||||
|
|
||||||
@@ -2925,7 +2926,21 @@ public class OrdrController {
|
|||||||
|
|
||||||
// 2.가용재고수량 수정 ==============================================================
|
// 2.가용재고수량 수정 ==============================================================
|
||||||
try {
|
try {
|
||||||
boGoodsService.updateOrdrUsefulInvntryQy(orderVO);
|
BOOrdrVO ordrVO = new BOOrdrVO();
|
||||||
|
ordrVO.setOrdrInnb(orderVO.getOrdrInnb().toString());
|
||||||
|
ordrVO.setSopmalCd(orderVO.getSopmalCd());
|
||||||
|
|
||||||
|
DataMap ordrDtl = (DataMap) service.selectOrdrDtlInqire(ordrVO).get("dtl");
|
||||||
|
boolean subsvcAt = "Y".equals(ordrDtl.get("subsvcAt"));
|
||||||
|
// 구독서비스 여부(subsvcAt)에 따라 재고 처리 로직을 분기
|
||||||
|
if(subsvcAt) {
|
||||||
|
// 구독서비스
|
||||||
|
ordrVO.setSubsvcInnb(ordrDtl.get("subsvcInnb").toString());
|
||||||
|
subsvcService.updateSubsvcOrdrUsefulInvntryQy(ordrVO);
|
||||||
|
} else {
|
||||||
|
// 일반 주문
|
||||||
|
boGoodsService.updateOrdrUsefulInvntryQy(orderVO);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logVO.setFailContent("상품 재고수량 업데이트 실패");
|
logVO.setFailContent("상품 재고수량 업데이트 실패");
|
||||||
log.error("{} 상품 재고수량 업데이트 실패!", payVO.getOrderId());
|
log.error("{} 상품 재고수량 업데이트 실패!", payVO.getOrderId());
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ mngrfo:
|
|||||||
images: .gif,.jpg,.jpeg,.png
|
images: .gif,.jpg,.jpeg,.png
|
||||||
cdnurl: https://19b0bde6dcdc15ad.kinxzone.com
|
cdnurl: https://19b0bde6dcdc15ad.kinxzone.com
|
||||||
subsvc:
|
subsvc:
|
||||||
dft-goods-optn-innb: 5
|
dft-goods-optn-innb: 1
|
||||||
|
|
||||||
|
|
||||||
secret:
|
secret:
|
||||||
|
|||||||
@@ -769,4 +769,122 @@
|
|||||||
SELECT PURCHS_REVALID_AT FROM GC_SHOP WHERE 1=1 AND SOPMAL_CD = #{sopmalCd}
|
SELECT PURCHS_REVALID_AT FROM GC_SHOP WHERE 1=1 AND SOPMAL_CD = #{sopmalCd}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 구독서비스 주문 전 주문정보 재확인 -->
|
||||||
|
<select id="selectBOSubsvcPreOrderValidation" parameterType="com.wb.domainserver.domain.admin.instcSle.mtng.vo.BOPreOrderValidVO" resultType="dataMap">
|
||||||
|
<![CDATA[
|
||||||
|
SELECT
|
||||||
|
CASE
|
||||||
|
WHEN GOODS.SUBSVC_STTUS_CD = '01' THEN 0
|
||||||
|
ELSE 1
|
||||||
|
END AS GOODS_STTUS, -- 상품상태 정상 확인
|
||||||
|
CASE
|
||||||
|
WHEN GOODS.PURCHS_QY_LMTT_DV_CD = '01' OR GOODS.PURCHS_QY_LMTT_DV_CD IS NULL THEN 0
|
||||||
|
ELSE
|
||||||
|
CASE
|
||||||
|
WHEN #{goodsTotalQy} BETWEEN GOODS.MUMM_PURCHS_QY AND GOODS.MXMM_PURCHS_QY THEN 0
|
||||||
|
ELSE 1
|
||||||
|
END
|
||||||
|
END AS PURCHS_QY_LMTT, -- 상품별 최소 최대 구매수량제한여부
|
||||||
|
CASE
|
||||||
|
WHEN GOODS.INVNTRY_POLICY_CD = '02' THEN 0
|
||||||
|
ELSE
|
||||||
|
CASE
|
||||||
|
WHEN (GOODS.INVNTRY_QY - IFNULL(GOODS.USEFUL_INVNTRY_QY, 0)) >= #{qy} THEN 0
|
||||||
|
ELSE 1
|
||||||
|
END
|
||||||
|
END AS INVNTRY, -- 각 옵션별 재고 유무
|
||||||
|
CASE
|
||||||
|
WHEN GOODS.INVNTRY_POLICY_CD = '02' THEN 0
|
||||||
|
ELSE
|
||||||
|
CASE
|
||||||
|
WHEN (IFNULL(GOODS.REST_INVNTRY_QY, 0) - IFNULL(GOODS.AVLINV_LMTT_QY, 0)) >= #{goodsTotalQy} THEN 0
|
||||||
|
ELSE 1
|
||||||
|
END
|
||||||
|
END AS INVNTRY_POLICY, -- 상품별 옵션 수량합산 재고유무
|
||||||
|
CASE
|
||||||
|
WHEN IFNULL(GOODS.SUBSVC_CT, 0) = #{slepric} THEN 0
|
||||||
|
ELSE 1
|
||||||
|
END AS SELPRIC, -- 판매가 변경여부
|
||||||
|
0 AS DSCNT_AT, -- 구간,복수할인 정보 변경 여부
|
||||||
|
0 AS DLVY_GROUP, -- 배송그룹 변경여부
|
||||||
|
0 AS PURCHS_TRGTER_LMTT, -- 구매대상자 제한
|
||||||
|
0 AS COUPON_STTUS, -- 쿠폰 상태 확인
|
||||||
|
0 AS COUPON_USE_AT, -- 쿠폰 회수여부 확인
|
||||||
|
0 AS COUPON_VALIDPD_DT, -- 쿠폰 유효기간 확인
|
||||||
|
0 AS EVT_TRGET_AT, -- 이벤트 진행여부 이벤트 대상일경우 1을 반환함 = 정상 처리 0 이벤트 대상 아닐경우 1
|
||||||
|
0 AS DPLCT_LMTT_COUPON, -- 이벤트 중복제한 쿠폰 존재여부
|
||||||
|
0 AS OPTN_EXPSR_AT -- 상품옵션 노출여부
|
||||||
|
FROM (
|
||||||
|
SELECT
|
||||||
|
GS.SUBSVC_INNB, -- 구독서비스 고유번호
|
||||||
|
GG.GOODS_INNB, -- 상품 고유번호
|
||||||
|
GS.SOPMAL_CD, -- 쇼핑몰코드
|
||||||
|
GS.SUBSVC_CT, -- 구독료
|
||||||
|
GG.DLVY_GROUP_INNB, -- 배송그룹고유번호
|
||||||
|
GG.GOODS_KND_CD, -- 상품구분 01 상품
|
||||||
|
GS.SUBSVC_STTUS_CD, -- 상품상태 01 정상
|
||||||
|
GS.PURCHS_QY_LMTT_DV_CD, -- 구매수량제한여부 02 제한
|
||||||
|
GS.MUMM_PURCHS_QY, -- 최소구매수량
|
||||||
|
GS.MXMM_PURCHS_QY, -- 최대구매수량
|
||||||
|
GS.INVNTRY_POLICY_CD, -- 재고정책 01 재고가 있으면 판매 02 재고없어도 판매
|
||||||
|
GS.AVLINV_LMTT_QY, -- 가용재고제한수량
|
||||||
|
GG.PURCHS_TRGTER_LMTT_DV_CD, -- 구매 대상자 제한 02 제한
|
||||||
|
SUM(IFNULL(GS.INVNTRY_QY, 0)) AS INVNTRY_QY, -- 상품 재고수량 합계
|
||||||
|
SUM(IFNULL(GS.USEFUL_INVNTRY_QY, 0)) AS USEFUL_INVNTRY_QY, -- 상품 사용 재고수량 합계
|
||||||
|
SUM(IFNULL(GS.INVNTRY_QY, 0)) - SUM(IFNULL(GS.USEFUL_INVNTRY_QY, 0)) AS REST_INVNTRY_QY -- 잔여 재고수량 합계
|
||||||
|
FROM GC_SUBSVC GS
|
||||||
|
INNER JOIN GC_GOODS_OPTION GGO
|
||||||
|
ON GS.SOPMAL_CD = GGO.SOPMAL_CD
|
||||||
|
AND GS.DFT_GOODS_OPTN_INNB = GGO.GOODS_OPTN_INNB
|
||||||
|
AND GS.USE_AT = 'Y'
|
||||||
|
AND GGO.USE_AT = 'Y'
|
||||||
|
INNER JOIN GC_GOODS GG
|
||||||
|
ON GS.SOPMAL_CD = GG.SOPMAL_CD
|
||||||
|
AND GGO.GOODS_INNB = GG.GOODS_INNB
|
||||||
|
AND GG.USE_AT = 'Y'
|
||||||
|
WHERE 1 = 1
|
||||||
|
AND GS.SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND GS.SUBSVC_INNB = #{subsvcInnb}
|
||||||
|
GROUP BY
|
||||||
|
GG.GOODS_INNB
|
||||||
|
) GOODS
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
GM.MBR_INNB,
|
||||||
|
GM.MBR_DV_CD,
|
||||||
|
GMGM.SOPMAL_CD,
|
||||||
|
GMG.MBR_GRAD_INNB
|
||||||
|
FROM
|
||||||
|
GC_MEMBER GM
|
||||||
|
INNER JOIN GC_MEMBER_GRAD_MAPPING GMGM
|
||||||
|
ON GM.MBR_INNB = GMGM.MBR_INNB
|
||||||
|
AND GM.MBR_DV_CD = GMGM.MBR_DV_CD
|
||||||
|
AND GM.USE_AT = 'Y'
|
||||||
|
INNER JOIN GC_MEMBER_GRAD GMG
|
||||||
|
ON GMGM.MBR_GRAD_INNB = GMG.MBR_GRAD_INNB
|
||||||
|
AND GMGM.SOPMAL_CD = GMG.SOPMAL_CD
|
||||||
|
AND GMG.USE_AT = 'Y'
|
||||||
|
WHERE 1 = 1
|
||||||
|
AND GMGM.SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND GM.MBR_INNB = #{mbrInnb}
|
||||||
|
) MBR
|
||||||
|
ON MBR.SOPMAL_CD = GOODS.SOPMAL_CD
|
||||||
|
WHERE 1 = 1
|
||||||
|
GROUP BY
|
||||||
|
GOODS_STTUS,
|
||||||
|
PURCHS_QY_LMTT,
|
||||||
|
INVNTRY,
|
||||||
|
INVNTRY_POLICY,
|
||||||
|
SELPRIC,
|
||||||
|
DSCNT_AT,
|
||||||
|
DLVY_GROUP,
|
||||||
|
PURCHS_TRGTER_LMTT,
|
||||||
|
COUPON_STTUS,
|
||||||
|
COUPON_USE_AT,
|
||||||
|
COUPON_VALIDPD_DT,
|
||||||
|
EVT_TRGET_AT,
|
||||||
|
DPLCT_LMTT_COUPON
|
||||||
|
]]>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -224,6 +224,7 @@
|
|||||||
AND (FB.NTC_AT = 'N' OR (FB.NTC_AT = 'Y' AND FB.NTC_PD_SETUP_AT = 'N'))
|
AND (FB.NTC_AT = 'N' OR (FB.NTC_AT = 'Y' AND FB.NTC_PD_SETUP_AT = 'N'))
|
||||||
<if test = "@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(serverDv, 'sopmal')">
|
<if test = "@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(serverDv, 'sopmal')">
|
||||||
<include refid="selectSopmalNtceWhere"/>
|
<include refid="selectSopmalNtceWhere"/>
|
||||||
|
AND FB.USE_AT = 'Y'
|
||||||
</if>
|
</if>
|
||||||
AND FB.SOPMAL_CD = #{sopmalCd}
|
AND FB.SOPMAL_CD = #{sopmalCd}
|
||||||
AND FB.BBS_ID = #{bbsId}
|
AND FB.BBS_ID = #{bbsId}
|
||||||
@@ -460,6 +461,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test = "@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(serverDv, 'sopmal')">
|
<if test = "@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(serverDv, 'sopmal')">
|
||||||
<include refid="selectSopmalNtceWhere"/>
|
<include refid="selectSopmalNtceWhere"/>
|
||||||
|
AND FB.USE_AT = 'Y'
|
||||||
</if>
|
</if>
|
||||||
AND FB.DEPTH = 0
|
AND FB.DEPTH = 0
|
||||||
AND FB.SOPMAL_CD = #{sopmalCd}
|
AND FB.SOPMAL_CD = #{sopmalCd}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
resultType="dataMap">
|
resultType="dataMap">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
SELECT GS.SUBSVC_INNB
|
SELECT GS.SUBSVC_INNB
|
||||||
, SUBSVC_STTUS_CD
|
, SUBSVC_STTUS_CD
|
||||||
, CONCAT(GS.SUBSVC_NM, ' (', GS.SUBSVC_GNR_NM, ')') AS SUBSVC_CONCAT_NM
|
, CONCAT(GS.SUBSVC_NM, ' (', GS.SUBSVC_GNR_NM, ')') AS SUBSVC_CONCAT_NM
|
||||||
FROM GC_SUBSVC GS
|
FROM GC_SUBSVC GS
|
||||||
WHERE GS.SOPMAL_CD = 'SK'
|
WHERE GS.SOPMAL_CD = 'SK'
|
||||||
AND GS.SUBSVC_STTUS_CD != '03'
|
AND GS.SUBSVC_STTUS_CD != '03'
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
, GS.SUBSVC_NM
|
, GS.SUBSVC_NM
|
||||||
, GS.SUB_PD /*구독기간*/
|
, GS.SUB_PD /*구독기간*/
|
||||||
, GS.SUBSVC_GNR /*기수*/
|
, GS.SUBSVC_GNR /*기수*/
|
||||||
, (SELECT MAX(A.SUBSVC_GNR) + 1 FROM GC_SUBSVC A WHERE A.SOPMAL_CD = GS.SOPMAL_CD AND A.SUBSVC_NM = GS.SUBSVC_NM) AS SUBSVC_NEXT_GNR /*다음기수*/
|
, (SELECT MAX(A.SUBSVC_GNR) + 1 FROM GC_SUBSVC A WHERE A.SOPMAL_CD = GS.SOPMAL_CD AND A.SUBSVC_NM = GS.SUBSVC_NM) AS SUBSVC_NEXT_GNR /*다음기수*/
|
||||||
, GS.SUBSVC_GNR_NM /*기수명*/
|
, GS.SUBSVC_GNR_NM /*기수명*/
|
||||||
, CONCAT(GS.SUBSVC_NM, ' (', GS.SUBSVC_GNR_NM, ')') AS SUBSVC_CONCAT_NM
|
, CONCAT(GS.SUBSVC_NM, ' (', GS.SUBSVC_GNR_NM, ')') AS SUBSVC_CONCAT_NM
|
||||||
, GS.DLVY_CNT /*배송횟수*/
|
, GS.DLVY_CNT /*배송횟수*/
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
, GS.SUBSVC_CT /*구독료*/
|
, GS.SUBSVC_CT /*구독료*/
|
||||||
, GS.TME_DLVY_AMT /*1회배송비*/
|
, GS.TME_DLVY_AMT /*1회배송비*/
|
||||||
, GS.CNSMRPRIC /*소비자가*/
|
, GS.CNSMRPRIC /*소비자가*/
|
||||||
, GS.SUBSVC_CT + (TME_DLVY_AMT * DLVY_CNT) as SELPRIC /*실판매가=구독료+(1회배송비X배송횟수)*/
|
, GS.SUBSVC_CT + (TME_DLVY_AMT * DLVY_CNT) as SLEPRIC /*실판매가=구독료+(1회배송비X배송횟수)*/
|
||||||
, ROUND((GS.CNSMRPRIC - (GS.SUBSVC_CT + (TME_DLVY_AMT * DLVY_CNT))) / NULLIF(GS.CNSMRPRIC, 0) * 100, 0) AS DSCNT_RAITO
|
, ROUND((GS.CNSMRPRIC - (GS.SUBSVC_CT + (TME_DLVY_AMT * DLVY_CNT))) / NULLIF(GS.CNSMRPRIC, 0) * 100, 0) AS DSCNT_RAITO
|
||||||
, GS.INVNTRY_QY /*재고수량*/
|
, GS.INVNTRY_QY /*재고수량*/
|
||||||
, GS.USEFUL_INVNTRY_QY /*판매재고수량*/
|
, GS.USEFUL_INVNTRY_QY /*판매재고수량*/
|
||||||
@@ -131,10 +131,10 @@
|
|||||||
</if>
|
</if>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
<choose>
|
<choose>
|
||||||
<when test="sortDv == 'subsvcGnrAsc'">
|
<when test="sortDv == 'subsvcGnrAsc'">
|
||||||
GS.SUBSVC_NM ASC, SUBSVC_GNR ASC,
|
GS.SUBSVC_NM ASC, SUBSVC_GNR ASC,
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
GS.SUBSVC_NM DESC, SUBSVC_GNR DESC,
|
GS.SUBSVC_NM DESC, SUBSVC_GNR DESC,
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
@@ -262,7 +262,7 @@
|
|||||||
, USE_AT
|
, USE_AT
|
||||||
, REGUSR
|
, REGUSR
|
||||||
, REGIST_DT)
|
, REGIST_DT)
|
||||||
VALUES (#{sopmalCd}
|
VALUES (#{sopmalCd}
|
||||||
, #{subsvcNm}
|
, #{subsvcNm}
|
||||||
, #{subPd}
|
, #{subPd}
|
||||||
, #{subsvcGnr}
|
, #{subsvcGnr}
|
||||||
@@ -312,4 +312,89 @@
|
|||||||
WHERE GS.SOPMAL_CD = #{sopmalCd}
|
WHERE GS.SOPMAL_CD = #{sopmalCd}
|
||||||
AND GS.SUBSVC_NM = #{subsvcNm}
|
AND GS.SUBSVC_NM = #{subsvcNm}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 구독서비스 주문에 따른 판매재고수량 수정 -->
|
||||||
|
<update id="updateSubsvcOrdrUsefulInvntryQy" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||||
|
<![CDATA[
|
||||||
|
UPDATE GC_SUBSVC GS
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
GO.SUBSVC_INNB,
|
||||||
|
COUNT(*) AS ORDR_QY
|
||||||
|
FROM GC_ORDER GO
|
||||||
|
WHERE GO.SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND GO.ORDR_INNB = #{ordrInnb}
|
||||||
|
GROUP BY
|
||||||
|
GO.SUBSVC_INNB
|
||||||
|
) SUBQUERY
|
||||||
|
ON GS.SUBSVC_INNB = SUBQUERY.SUBSVC_INNB
|
||||||
|
SET GS.USEFUL_INVNTRY_QY = IFNULL(GS.USEFUL_INVNTRY_QY, 0) + SUBQUERY.ORDR_QY
|
||||||
|
WHERE GS.SUBSVC_INNB = SUBQUERY.SUBSVC_INNB
|
||||||
|
]]>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 구독서비스 환불에 따른 판매재고수량 수정 -->
|
||||||
|
<update id="updateSubsvcRefundUsefulInvntryQy" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||||
|
<![CDATA[
|
||||||
|
UPDATE GC_SUBSVC GS
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
GO.SUBSVC_INNB,
|
||||||
|
SUM(CASE WHEN GOR.REFUND_TY_CD = '01' THEN 1 ELSE 0 END) AS REFUND_QY
|
||||||
|
FROM GC_ORDER GO
|
||||||
|
INNER JOIN GC_ORDER_REFUND GOR
|
||||||
|
ON GO.ORDR_INNB = GOR.ORDR_INNB
|
||||||
|
WHERE GO.SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND GO.ORDR_INNB = #{ordrInnb}
|
||||||
|
GROUP BY
|
||||||
|
GO.SUBSVC_INNB
|
||||||
|
) SUBQUERY
|
||||||
|
ON GS.SUBSVC_INNB = SUBQUERY.SUBSVC_INNB
|
||||||
|
SET GS.USEFUL_INVNTRY_QY = IFNULL(GS.USEFUL_INVNTRY_QY, 0) - SUBQUERY.REFUND_QY
|
||||||
|
WHERE GS.SUBSVC_INNB = SUBQUERY.SUBSVC_INNB
|
||||||
|
]]>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 구독서비스 주문무효에 따른 판매재고수량 수정 -->
|
||||||
|
<update id="updateSubsvcCancelOrderUsefulInvntryQy" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||||
|
<![CDATA[
|
||||||
|
UPDATE GC_SUBSVC GS
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
GO.SUBSVC_INNB,
|
||||||
|
COUNT(*) AS ORDR_QY
|
||||||
|
FROM GC_ORDER GO
|
||||||
|
WHERE GO.SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND GO.ORDR_INNB = #{ordrInnb}
|
||||||
|
GROUP BY
|
||||||
|
GO.SUBSVC_INNB
|
||||||
|
) SUBQUERY
|
||||||
|
ON GS.SUBSVC_INNB = SUBQUERY.SUBSVC_INNB
|
||||||
|
SET GS.USEFUL_INVNTRY_QY = IFNULL(GS.USEFUL_INVNTRY_QY, 0) - SUBQUERY.ORDR_QY
|
||||||
|
WHERE GS.SUBSVC_INNB = SUBQUERY.SUBSVC_INNB
|
||||||
|
]]>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 판매재고수량 변경에 따른 구독서비스 상태 수정 -->
|
||||||
|
<update id="updateInvntryPolicySubsvcSttusChng" parameterType="com.wb.domainserver.domain.gcone.goods.subsvc.vo.BOSubsvcVO">
|
||||||
|
<![CDATA[
|
||||||
|
UPDATE GC_SUBSVC
|
||||||
|
SET SUBSVC_STTUS_CD =
|
||||||
|
CASE
|
||||||
|
WHEN INVNTRY_POLICY_CD = '02' THEN SUBSVC_STTUS_CD
|
||||||
|
ELSE
|
||||||
|
CASE
|
||||||
|
WHEN (INVNTRY_QY - IFNULL(USEFUL_INVNTRY_QY, 0)) > IFNULL(AVLINV_LMTT_QY, 0)
|
||||||
|
AND SUBSVC_STTUS_CD <> '03' THEN '01'
|
||||||
|
WHEN (INVNTRY_QY - IFNULL(USEFUL_INVNTRY_QY, 0)) <= IFNULL(AVLINV_LMTT_QY, 0)
|
||||||
|
AND SUBSVC_STTUS_CD <> '03' THEN '02'
|
||||||
|
ELSE SUBSVC_STTUS_CD
|
||||||
|
END
|
||||||
|
END
|
||||||
|
WHERE SUBSVC_INNB = #{subsvcInnb}
|
||||||
|
AND SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND USE_AT = 'Y'
|
||||||
|
]]>
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -4637,6 +4637,12 @@ CORE STYLES ABOVE - NO TOUCHY
|
|||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 56px;
|
margin-bottom: 56px;
|
||||||
}
|
}
|
||||||
|
.sub-right-content__section__btn {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
.sub-right-content__halfSection {
|
.sub-right-content__halfSection {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 56px;
|
margin-bottom: 56px;
|
||||||
|
|||||||
@@ -4654,6 +4654,12 @@ CORE STYLES ABOVE - NO TOUCHY
|
|||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 56px;
|
margin-bottom: 56px;
|
||||||
}
|
}
|
||||||
|
.sub-right-content__section__btn {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
.sub-right-content__halfSection {
|
.sub-right-content__halfSection {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 56px;
|
margin-bottom: 56px;
|
||||||
|
|||||||
@@ -4650,6 +4650,12 @@ CORE STYLES ABOVE - NO TOUCHY
|
|||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 56px;
|
margin-bottom: 56px;
|
||||||
}
|
}
|
||||||
|
.sub-right-content__section__btn {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
.sub-right-content__halfSection {
|
.sub-right-content__halfSection {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 56px;
|
margin-bottom: 56px;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${isAuthenticated}"><%--회원일시--%>
|
<c:when test="${isAuthenticated}"><%--회원일시--%>
|
||||||
<a href="/sopmal/mpage/mbr/selectMpageMainInqire" class="textBtns__btn">마이페이지</a>
|
<a href="/sopmal/mpage/mbr/selectMpageMainInqire" class="textBtns__btn">마이페이지</a>
|
||||||
<a href="/logout" class="textBtns__btn">로그아웃</a>
|
<a href="/sopmal/logout" class="textBtns__btn">로그아웃</a>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise><%--비회원일시--%>
|
<c:otherwise><%--비회원일시--%>
|
||||||
<a href="/sopmal/mpage/ordr/selectMbrOrdrListInqire" class="textBtns__btn">주문조회</a>
|
<a href="/sopmal/mpage/ordr/selectMbrOrdrListInqire" class="textBtns__btn">주문조회</a>
|
||||||
|
|||||||
@@ -84,6 +84,14 @@
|
|||||||
</c:forEach>
|
</c:forEach>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${bbs.bbscttTot eq 0 }" >
|
<c:if test="${bbs.bbscttTot eq 0 }" >
|
||||||
|
<c:choose>
|
||||||
|
<c:when test = "${bbs.bbsTyCd eq '06' || bbs.bbsTyCd eq '07'}">
|
||||||
|
<c:set var = "url" value = "/mngr/bbs/rvw/selectRvwListInqireForm?bbsId="/>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<c:set var = "url" value = "/mngr/bbs/gnrlsctt/selectBbscttListInqireForm?bbsId="/>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4">등록된 게시글이 없습니다.</td>
|
<td colspan="4">등록된 게시글이 없습니다.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -33,6 +33,9 @@
|
|||||||
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
|
$(this).val(input.replace(/[^0-9]/g, "").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//실판매가 세팅
|
||||||
|
fn_cal_selpric();
|
||||||
|
|
||||||
const expsrSetTable = document.getElementById('expsrSet');
|
const expsrSetTable = document.getElementById('expsrSet');
|
||||||
//노출예약 체크되어있을 경우 enable 처리
|
//노출예약 체크되어있을 경우 enable 처리
|
||||||
if($("input[name='expsrDvCd']:checked").val() ==='03'){
|
if($("input[name='expsrDvCd']:checked").val() ==='03'){
|
||||||
@@ -504,7 +507,6 @@
|
|||||||
<input type="hidden" id="expsrBgnDt" name="expsrBgnDt" value="${resultMap.subsvcDtl.expsrBgnDt}">
|
<input type="hidden" id="expsrBgnDt" name="expsrBgnDt" value="${resultMap.subsvcDtl.expsrBgnDt}">
|
||||||
<input type="hidden" id="expsrEndDt" name="expsrEndDt" value="${resultMap.subsvcDtl.expsrEndDt}">
|
<input type="hidden" id="expsrEndDt" name="expsrEndDt" value="${resultMap.subsvcDtl.expsrEndDt}">
|
||||||
<input type="hidden" id="invntryPolicyCdAsIs" value="${resultMap.subsvcDtl.invntryPolicyCd}">
|
<input type="hidden" id="invntryPolicyCdAsIs" value="${resultMap.subsvcDtl.invntryPolicyCd}">
|
||||||
<input type="hidden" id="usefulInvntryQy" name="usefulInvntryQy" value="${resultMap.subsvcDtl.usefulInvntryQy}">
|
|
||||||
<spring:eval expression="@environment.getProperty('spring.servlet.multipart.max-file-size')" var="maxFileSize"/>
|
<spring:eval expression="@environment.getProperty('spring.servlet.multipart.max-file-size')" var="maxFileSize"/>
|
||||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||||
@@ -613,7 +615,7 @@
|
|||||||
<th>실판매가<span class="red-7">*</span></th>
|
<th>실판매가<span class="red-7">*</span></th>
|
||||||
<td>
|
<td>
|
||||||
<div class="td-inner">
|
<div class="td-inner">
|
||||||
<input class="input-text sm number text-right allow-zero" type="text" title="실판매가" id="selpric" name="selpric" maxlength="11" value="${resultMap.subsvcDtl.selpric}" required readonly> 円(엔)
|
<input class="input-text sm number text-right allow-zero" type="text" title="실판매가" id="selpric" name="selpric" maxlength="11" required readonly> 円(엔)
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -633,9 +635,9 @@
|
|||||||
<caption>구독설정</caption>
|
<caption>구독설정</caption>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col style="width: 12%;">
|
<col style="width: 12%;">
|
||||||
<col>
|
<col style="width: 38%">
|
||||||
<col style="width: 12%;">
|
<col style="width: 12%;">
|
||||||
<col>
|
<col style="width: 38%">
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -654,7 +656,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>판매 상태</th>
|
<th>판매 상태</th>
|
||||||
<td colspan="2">
|
<td>
|
||||||
<div class="td-inner">
|
<div class="td-inner">
|
||||||
<div class="custom-radio-container">
|
<div class="custom-radio-container">
|
||||||
<c:forEach items="${resultMap.subsvcSttusList}" var="subsvcSttus" varStatus="status">
|
<c:forEach items="${resultMap.subsvcSttusList}" var="subsvcSttus" varStatus="status">
|
||||||
@@ -667,6 +669,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<th>판매수량</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<input class="input-text sm text-right" type="text" title="판매재고수량" id="usefulInvntryQy" name="usefulInvntryQy" value="${resultMap.subsvcDtl.usefulInvntryQy}" readonly>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>노출 여부</th>
|
<th>노출 여부</th>
|
||||||
|
|||||||
@@ -820,6 +820,7 @@
|
|||||||
tr += ' <td class="left">';
|
tr += ' <td class="left">';
|
||||||
tr += ' <div class="order-number">';
|
tr += ' <div class="order-number">';
|
||||||
tr += ' <div class="order-number__content ' + ordrSttus + '">';
|
tr += ' <div class="order-number__content ' + ordrSttus + '">';
|
||||||
|
tr += ' <p>' + data.ordrInnb + '</p></br>';
|
||||||
tr += ' <button class="fs-13 under-line" onclick="fn_go_dlivy_dtl2(\'' + data.dlivyInnb + '\', \'' + data.ordrInnb + '\'); return false;">' + data.dlivyCdNb + '</button>';
|
tr += ' <button class="fs-13 under-line" onclick="fn_go_dlivy_dtl2(\'' + data.dlivyInnb + '\', \'' + data.ordrInnb + '\'); return false;">' + data.dlivyCdNb + '</button>';
|
||||||
tr += ' <div class="order-number__btn-container">';
|
tr += ' <div class="order-number__btn-container">';
|
||||||
tr += ' <button type="button" onclick="fn_go_ordr_dtstmn_dwld_popup(\'' + data.dlivyInnb + '\', \'' + data.ordrInnb + '\')">';
|
tr += ' <button type="button" onclick="fn_go_ordr_dtstmn_dwld_popup(\'' + data.dlivyInnb + '\', \'' + data.ordrInnb + '\')">';
|
||||||
@@ -1947,7 +1948,7 @@
|
|||||||
<th>번호</th>
|
<th>번호</th>
|
||||||
<th>원주문</th>
|
<th>원주문</th>
|
||||||
<th>상태변경일시</th>
|
<th>상태변경일시</th>
|
||||||
<th>출고번호</th>
|
<th>주문번호</br>출고번호</th>
|
||||||
<th>출고상품</th>
|
<th>출고상품</th>
|
||||||
<th>수(종)</th>
|
<th>수(종)</th>
|
||||||
<th>받는분/주문자</th>
|
<th>받는분/주문자</th>
|
||||||
|
|||||||
@@ -398,9 +398,16 @@
|
|||||||
|
|
||||||
const currOrdrSttusCd = tr.replace('order-sttus-cd-', '');
|
const currOrdrSttusCd = tr.replace('order-sttus-cd-', '');
|
||||||
const chgOrdrSttusCd = $(this).attr('id').replace('ordrSttus', '');
|
const chgOrdrSttusCd = $(this).attr('id').replace('ordrSttus', '');
|
||||||
|
const hasSubsvc = $(rowCheckboxs).is(function() {
|
||||||
|
return $(this).closest('tr').find('input[name="subsvcAt"]').val() === 'Y';
|
||||||
|
});
|
||||||
|
|
||||||
let msg = '';
|
let msg = '';
|
||||||
|
|
||||||
|
if (chgOrdrSttusCd === '35' && hasSubsvc) {
|
||||||
|
alert('구독서비스의 상품준비 처리는 "구독서비스 상품준비 관리" 화면에서 처리해주세요.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ('35' === chgOrdrSttusCd) {
|
if ('35' === chgOrdrSttusCd) {
|
||||||
msg = '선택된 주문의 \'' + fn_get_code_nm('sttusCd', currOrdrSttusCd) + '\' → \'' + fn_get_code_nm('sttusCd', chgOrdrSttusCd) + '\'로 변경하시겠습니까?';
|
msg = '선택된 주문의 \'' + fn_get_code_nm('sttusCd', currOrdrSttusCd) + '\' → \'' + fn_get_code_nm('sttusCd', chgOrdrSttusCd) + '\'로 변경하시겠습니까?';
|
||||||
} else {
|
} else {
|
||||||
@@ -856,6 +863,7 @@
|
|||||||
}else{
|
}else{
|
||||||
tr += '일반';
|
tr += '일반';
|
||||||
}
|
}
|
||||||
|
tr += '<input type="hidden" name="subsvcAt" value="' + data.subsvcAt + '">';
|
||||||
tr += ' </td>';
|
tr += ' </td>';
|
||||||
tr += ' <td>' + data.ordrRceptDt + '</td>';
|
tr += ' <td>' + data.ordrRceptDt + '</td>';
|
||||||
tr += ' <td>' + fn_nvl(data.sleEnvrnNm, '') + '</td>';
|
tr += ' <td>' + fn_nvl(data.sleEnvrnNm, '') + '</td>';
|
||||||
|
|||||||
@@ -102,9 +102,14 @@
|
|||||||
const ordrInnb = $('#ordrInnb').text();
|
const ordrInnb = $('#ordrInnb').text();
|
||||||
const chgOrdrSttusCd = ($(this).attr('class').split(' ')[0]).replace('btn-ordr-sttus-', '');
|
const chgOrdrSttusCd = ($(this).attr('class').split(' ')[0]).replace('btn-ordr-sttus-', '');
|
||||||
const currOrdrSttusCd = '${data.dtl.ordrSttusCd}';
|
const currOrdrSttusCd = '${data.dtl.ordrSttusCd}';
|
||||||
|
const subsvcAt = '${data.dtl.subsvcAt}';
|
||||||
|
|
||||||
|
if (chgOrdrSttusCd === '35' && subsvcAt === 'Y') {
|
||||||
|
alert('구독서비스의 상품준비 처리는 "구독서비스 상품준비 관리" 화면에서 처리해주세요.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let msg = '선택된 주문을 \'' + fn_get_code_nm('sttusCd', chgOrdrSttusCd) + '\' 처리 하시겠습니까?';
|
let msg = '선택된 주문을 \'' + fn_get_code_nm('sttusCd', chgOrdrSttusCd) + '\' 처리 하시겠습니까?';
|
||||||
|
|
||||||
if (confirm(msg)) {
|
if (confirm(msg)) {
|
||||||
fn_post_ordr_sttus([ordrInnb], chgOrdrSttusCd, currOrdrSttusCd);
|
fn_post_ordr_sttus([ordrInnb], chgOrdrSttusCd, currOrdrSttusCd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -195,6 +195,9 @@
|
|||||||
}else if ($("#listAt").val() === 'm2m') {
|
}else if ($("#listAt").val() === 'm2m') {
|
||||||
/*1:1 문의*/
|
/*1:1 문의*/
|
||||||
setMenuCode('39','/sopmal/mpage/act/selectM2mQnaInqire?bbsId=mbrqna');
|
setMenuCode('39','/sopmal/mpage/act/selectM2mQnaInqire?bbsId=mbrqna');
|
||||||
|
}else if ($("#listAt").val() === 'nlist') {
|
||||||
|
/*일반 문의*/
|
||||||
|
setMenuCode('89','/sopmal/mpage/act/selectNormalQnaInqire?bbsId=normal_qna');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -625,6 +628,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="alert-btn-container">
|
<div class="alert-btn-container">
|
||||||
|
<a href="#" rel="modal:close" class="btn large outline close"><spring:message code="button.close"/></a>
|
||||||
<button class="alert-btn alert-btn--confirm" id="alertBtn"><spring:message code="button.ok"/></button>
|
<button class="alert-btn alert-btn--confirm" id="alertBtn"><spring:message code="button.ok"/></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -54,14 +54,14 @@
|
|||||||
$('#dlvyCnt').text(data.dlvyCnt);
|
$('#dlvyCnt').text(data.dlvyCnt);
|
||||||
$('#dlvyCycle').text(data.dlvyCycle);
|
$('#dlvyCycle').text(data.dlvyCycle);
|
||||||
$('#cnsmrpric').text(fn_format_number(data.cnsmrpric) + curUnit);
|
$('#cnsmrpric').text(fn_format_number(data.cnsmrpric) + curUnit);
|
||||||
$('#selpric').text(fn_format_number(data.selpric) + curUnit);
|
$('#slepric').text(fn_format_number(data.slepric) + curUnit);
|
||||||
$('#dscntRaito').text(data.dscntRaito + '%');
|
$('#dscntRaito').text(data.dscntRaito + '%');
|
||||||
$('#subsvcDc').html(data.subsvcDc);
|
$('#subsvcDc').html(data.subsvcDc);
|
||||||
fn_hide_subsvcDetail(data.subPd, data.dlvyCnt, data.selpric);
|
fn_hide_subsvcDetail(data.subPd, data.dlvyCnt, data.slepric);
|
||||||
|
|
||||||
$("#fixedImg").attr("src", cdnurl + data.img);
|
$("#fixedImg").attr("src", cdnurl + data.img);
|
||||||
$('#fixedTitle').text(data.subsvcConcatNm);
|
$('#fixedTitle').text(data.subsvcConcatNm);
|
||||||
$('#fixedPrice').text(fn_format_number(data.selpric));
|
$('#fixedPrice').text(fn_format_number(data.slepric));
|
||||||
|
|
||||||
switch (data.subsvcSttusCd) {
|
switch (data.subsvcSttusCd) {
|
||||||
case '01':
|
case '01':
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
/******************************************************
|
/******************************************************
|
||||||
* 구독서비스 상세 숨기기
|
* 구독서비스 상세 숨기기
|
||||||
* ****************************************************/
|
* ****************************************************/
|
||||||
const fn_hide_subsvcDetail = function(subPd, dlvyCnt, selpric) {
|
const fn_hide_subsvcDetail = function(subPd, dlvyCnt, slepric) {
|
||||||
function isEmpty(val) {
|
function isEmpty(val) {
|
||||||
return !val || val === 0;
|
return !val || val === 0;
|
||||||
}
|
}
|
||||||
@@ -99,8 +99,8 @@
|
|||||||
hideIf(isEmpty(subPd), 'li', '#subPd');
|
hideIf(isEmpty(subPd), 'li', '#subPd');
|
||||||
hideIf(isEmpty(dlvyCnt), 'li', '#dlvyCnt');
|
hideIf(isEmpty(dlvyCnt), 'li', '#dlvyCnt');
|
||||||
hideIf(isEmpty(subPd) && isEmpty(dlvyCnt), '.box', '#subPd');
|
hideIf(isEmpty(subPd) && isEmpty(dlvyCnt), '.box', '#subPd');
|
||||||
hideIf(isEmpty(selpric), '.box', '#selpric');
|
hideIf(isEmpty(slepric), '.box', '#slepric');
|
||||||
hideIf(isEmpty(selpric), '#fixedButton');
|
hideIf(isEmpty(slepric), '#fixedButton');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
@@ -109,19 +109,23 @@
|
|||||||
const fn_purchs_subsvc = function() {
|
const fn_purchs_subsvc = function() {
|
||||||
var checkedValue = $("select[name='subsvcInnb']").val();
|
var checkedValue = $("select[name='subsvcInnb']").val();
|
||||||
|
|
||||||
var tempForm = $('<form>', {
|
sessionStorage.setItem("subsvcInnb", checkedValue);
|
||||||
method: 'post',
|
location.href = "/sopmal/ordr/selectSubsvcPurchsForm" +
|
||||||
action: '/sopmal/ordr/selectSubsvcPurchsForm'
|
"?subsvcInnb=" + encodeURIComponent(checkedValue);
|
||||||
});
|
|
||||||
$('<input>', {
|
|
||||||
type: 'hidden',
|
|
||||||
name: 'subsvcInnb',
|
|
||||||
value: checkedValue
|
|
||||||
}).appendTo(tempForm);
|
|
||||||
|
|
||||||
tempForm.appendTo('body');
|
// var tempForm = $('<form>', {
|
||||||
tempForm.submit();
|
// method: 'post',
|
||||||
tempForm.remove();
|
// action: '/sopmal/ordr/selectSubsvcPurchsForm'
|
||||||
|
// });
|
||||||
|
// $('<input>', {
|
||||||
|
// type: 'hidden',
|
||||||
|
// name: 'subsvcInnb',
|
||||||
|
// value: checkedValue
|
||||||
|
// }).appendTo(tempForm);
|
||||||
|
//
|
||||||
|
// tempForm.appendTo('body');
|
||||||
|
// tempForm.submit();
|
||||||
|
// tempForm.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************
|
/******************************************************
|
||||||
@@ -262,7 +266,7 @@
|
|||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="productDetailInfo__price__price boxTitle">
|
<div class="productDetailInfo__price__price boxTitle">
|
||||||
<span id="cnsmrpric" class="product-unit-price__original"></span>
|
<span id="cnsmrpric" class="product-unit-price__original"></span>
|
||||||
<span id="selpric" class="product-unit-price__current"></span>
|
<span id="slepric" class="product-unit-price__current"></span>
|
||||||
<span id="dscntRaito" style="color: red">%</span>
|
<span id="dscntRaito" style="color: red">%</span>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" id="subscribeBtn" class="btn theme large" onclick="fn_purchs_subsvc();">구독하기</button>
|
<button type="button" id="subscribeBtn" class="btn theme large" onclick="fn_purchs_subsvc();">구독하기</button>
|
||||||
|
|||||||
354
src/main/webapp/WEB-INF/views/sopmal/mpage/act/MyNormalQaR.jsp
Normal file
354
src/main/webapp/WEB-INF/views/sopmal/mpage/act/MyNormalQaR.jsp
Normal file
@@ -0,0 +1,354 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||||
|
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||||
|
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld"%>
|
||||||
|
|
||||||
|
|
||||||
|
<%--
|
||||||
|
Class Name : MyNormalQaR.jsp
|
||||||
|
Description : 마이페이지 일반문의
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2026-04-06 김현욱 최초 생성
|
||||||
|
--%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<%-- 공통 include --%>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/Include.jsp"/>
|
||||||
|
</head>
|
||||||
|
<spring:eval expression="@environment.getProperty('sopmalfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
//아코디언 클릭 시 폼 제출 방지
|
||||||
|
$(".tr-foldable-trigger").click(function(event) {
|
||||||
|
if($(this).next().hasClass("active")){
|
||||||
|
const bbscttInnb = $(this).attr("bbsctt-innb");
|
||||||
|
const idx = $(this).index();
|
||||||
|
fn_select_fileInfo(bbscttInnb,idx);
|
||||||
|
}
|
||||||
|
event.preventDefault(); // 폼 제출 방지
|
||||||
|
});
|
||||||
|
|
||||||
|
//등록 버튼
|
||||||
|
$(document).on('click','#registBtn',function(){
|
||||||
|
const bbscttInnb = $(this).closest('div').find("[name='bbscttInnb']").val();
|
||||||
|
fn_pop_regist(bbscttInnb);
|
||||||
|
});
|
||||||
|
|
||||||
|
//삭제 모달 버튼
|
||||||
|
$(document).on('click','.deleteBtn',function(){
|
||||||
|
const bbscttInnb = $(this).closest('div').find("[name='bbscttInnb']").val();
|
||||||
|
$('#qna-delete').modal();
|
||||||
|
$('#alertDelBtn').attr('bbscttInnb', bbscttInnb);
|
||||||
|
});
|
||||||
|
//삭제 버튼
|
||||||
|
$(document).on('click','#alertDelBtn',function(){
|
||||||
|
const bbscttInnb = $(this).attr("bbscttInnb");
|
||||||
|
const bbsId = $("#bbsId").val();
|
||||||
|
const bbsTyCd = $("#bbsTyCd").val();
|
||||||
|
fn_delete_bbsctt(bbscttInnb,bbsId,bbsTyCd);
|
||||||
|
});
|
||||||
|
//수정 폼 이동 버튼
|
||||||
|
$(document).on('click','.updateBtn',function(){
|
||||||
|
const answAt = $(this).closest('div').find("[name='answAt']").val();
|
||||||
|
const bbscttInnb = $(this).closest('div').find("[name='bbscttInnb']").val();
|
||||||
|
const bbsId = $("#bbsId").val();
|
||||||
|
fn_move_qaUpdt(bbscttInnb,answAt,bbsId);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const fn_pop_regist = (bbscttInnb) => {
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
data: {
|
||||||
|
authDv: "REGIST",
|
||||||
|
reqUrl: "modal",
|
||||||
|
bbsId: "normal_qna",
|
||||||
|
bbscttInnb: bbscttInnb,
|
||||||
|
listAt: "nlist",
|
||||||
|
},
|
||||||
|
url: "/sopmal/csc/selectBbscttAuth",
|
||||||
|
success: function (data) {
|
||||||
|
/*모달중복제거*/
|
||||||
|
fn_close_modal("qna-pop-regist");
|
||||||
|
// fn_close_modal("qna-update-pop");
|
||||||
|
$("#modalDiv").html(data);
|
||||||
|
$("#qna-pop-regist").modal();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//해당 게시물 파일정보 get
|
||||||
|
const fn_select_fileInfo = (bbscttInnb, idx) => {
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "/sopmal/mpage/act/selectFileInfo",
|
||||||
|
data: {"bbscttInnb": bbscttInnb},
|
||||||
|
success: function (data) {
|
||||||
|
const resultData = JSON.parse(data.resBody.result);
|
||||||
|
const fileInfo = resultData.fileInfo;
|
||||||
|
let img = '';
|
||||||
|
fileInfo.forEach(function (file) {
|
||||||
|
img += `<img src="${cdnurl}\${file.filCours}\${file.sysFilNm}\" alt="\${file.orginlFilNm}\"
|
||||||
|
onerror="this.src='/pc/images/image_placeholder.png'; this.style.width='150px'; this.style.height='150px';"/>`;
|
||||||
|
});
|
||||||
|
$(".tr-foldable").eq(idx).find(".file").html(img);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//게시글 삭제
|
||||||
|
const fn_delete_bbsctt =(bbscttInnb,bbsId,bbsTyCd)=>{
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "/sopmal/csc/deleteBbscttDel",
|
||||||
|
data: {
|
||||||
|
"delBbscttInnbArr": bbscttInnb,
|
||||||
|
"bbsId": bbsId,
|
||||||
|
"bbsTyCd": bbsTyCd
|
||||||
|
},
|
||||||
|
success: function () {
|
||||||
|
alert('<spring:message code="success.common.delete"/>');
|
||||||
|
fn_close_modal('qna-delete');
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//페이징 목록 조회
|
||||||
|
const fn_select_List = (pageIndex) => {
|
||||||
|
const form = $('<form>', {
|
||||||
|
'action': '/sopmal/mpage/act/selectNormalQnaInqire',
|
||||||
|
'method': 'post'
|
||||||
|
}).append(
|
||||||
|
$('<input>', {
|
||||||
|
'type': 'hidden',
|
||||||
|
'name': 'bbsId',
|
||||||
|
'value': $("#bbsId").val()
|
||||||
|
})
|
||||||
|
).append(
|
||||||
|
$('<input>', {
|
||||||
|
'type': 'hidden',
|
||||||
|
'name': 'pageIndex',
|
||||||
|
'value': pageIndex
|
||||||
|
})
|
||||||
|
);
|
||||||
|
$('body').append(form);
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
//게시글 수정
|
||||||
|
const fn_move_qaUpdt =(bbscttInnb,answAt,bbsId)=>{
|
||||||
|
if(answAt == 'Y'){
|
||||||
|
//1.1 답변이 있는지 확인 있으면 수정 불가 모달 호출
|
||||||
|
$('#qna-edit').modal();
|
||||||
|
}else{
|
||||||
|
//1.2답변이 없는 경우 폼을 생성하고 전송
|
||||||
|
const form = $('<form>', {
|
||||||
|
'action': '/sopmal/mpage/act/selectNormalQnaDtlUpdtForm',
|
||||||
|
'method': 'post'
|
||||||
|
}).append(
|
||||||
|
$('<input>', {
|
||||||
|
'type': 'hidden',
|
||||||
|
'name': 'bbscttInnb',
|
||||||
|
'value': bbscttInnb
|
||||||
|
})
|
||||||
|
).append(
|
||||||
|
$('<input>', {
|
||||||
|
'type': 'hidden',
|
||||||
|
'name': 'bbsId',
|
||||||
|
'value': bbsId
|
||||||
|
})
|
||||||
|
).append(
|
||||||
|
$('<input>', {
|
||||||
|
'type': 'hidden',
|
||||||
|
'name': 'pageIndex',
|
||||||
|
'value': $("#pageIndex").val()
|
||||||
|
})
|
||||||
|
);
|
||||||
|
$('body').append(form);
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<body>
|
||||||
|
<%-- 공통 Header --%>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/Header.jsp"/>
|
||||||
|
|
||||||
|
<!-- 메인 컨텐츠 영역 -->
|
||||||
|
<main>
|
||||||
|
<div class="sub-wrapper">
|
||||||
|
<div class="sub-content">
|
||||||
|
<div class="sub-rl">
|
||||||
|
<%-- 마이페이지 Left 영역 --%>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mpage/MypageLeft.jsp"/>
|
||||||
|
<div class="sub-right-content">
|
||||||
|
<%-- 마이페이지 Right 영역 --%>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mpage/MypageRight.jsp"/>
|
||||||
|
<c:set value="${resultMap.bbsInfo}" var = "bbsInfo"/>
|
||||||
|
<input type = "hidden" value = "<c:out value="${bbsInfo.bbsId}"/>" id = "bbsId">
|
||||||
|
<input type = "hidden" value = "<c:out value="${bbsInfo.bbsTyCd}"/>" id = "bbsTyCd">
|
||||||
|
<input type="hidden" name="slangFlterUseAt" id = "slangFlterUseAt" value = "<c:out value="${bbsInfo.slangFlterUseAt}"/>">
|
||||||
|
<div class="sub-right-content__section">
|
||||||
|
<div class="sub-right-content__section__btn">
|
||||||
|
<h3 class="sub-right-content__title"><c:out value="${bbsInfo.bbsNm}"/></h3>
|
||||||
|
<button type="button" class="btn md theme" id="registBtn">글쓰기</button>
|
||||||
|
</div>
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table class="table vertical">
|
||||||
|
<caption>해당 테이블에 대한 설명</caption>
|
||||||
|
<!-- 각 열 width 설정 -->
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 10%;">
|
||||||
|
<col style="width: auto;">
|
||||||
|
<col style="width: 15%;">
|
||||||
|
<col style="width: 10%">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>번호</th>
|
||||||
|
<th>문의내용</th>
|
||||||
|
<th>작성일</th>
|
||||||
|
<th>답변유무</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test = "${ not empty resultMap.resultList.resultList }">
|
||||||
|
<c:forEach var="resultList" items="${ resultMap.resultList.resultList}">
|
||||||
|
<tr class="tr-foldable-trigger" bbsctt-innb = "<c:out value = '${resultList.bbscttInnb}'/>">
|
||||||
|
<td><span class="board-number"><c:out value="${resultMap.paginationInfo.totalRecordCount - resultList.rnum+1 }" /></span></td>
|
||||||
|
<td class="text-left">
|
||||||
|
<div class="board-inner-product">
|
||||||
|
<div class="board-inner-product__right">
|
||||||
|
<p class="board-inner-product__title">
|
||||||
|
<span class="category"><c:if test = "${not empty resultList.answCn}">[<c:out value="${resultList.answCn}"/>]</c:if></span>
|
||||||
|
<c:out value="${resultList.sj}"/>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td><span class="board-date"><c:out value="${resultList.sumRegistDt}"/></span></td>
|
||||||
|
<td>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test = "${not empty resultList.answBbscttInnb}">
|
||||||
|
<span class="text-complete">답변완료</span>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<span class="text-waiting">답변대기</span>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="tr-foldable">
|
||||||
|
<td colspan="5">
|
||||||
|
<div class="tr-foldable__content">
|
||||||
|
<div class="tr-foldable__qna">
|
||||||
|
<i class="icon icon_qna-q"></i>
|
||||||
|
<div class="tr-foldable__qna-content">
|
||||||
|
<p class="tr-foldable__qna-title"><c:out value="${resultList.sj}"/></p>
|
||||||
|
<div class = "cn" style="white-space: pre-wrap;"><c:out value="${resultList.cn}" escapeXml="false"/></div>
|
||||||
|
<br>
|
||||||
|
<div class = "file"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tr-foldable__qna">
|
||||||
|
<i class="icon icon_qna-a"></i>
|
||||||
|
<div class="tr-foldable__qna-content">
|
||||||
|
<p class="tr-foldable__qna-title answSj"><c:out value="${resultList.answSj}"/></p>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test = "${not empty resultList.answBbscttInnb}">
|
||||||
|
<div class = "cn ck-content"><c:out value="${resultList.answBbscttCn}" escapeXml="false"/></div>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
답변 등록 중 입니다.
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tr-foldable__btn-container">
|
||||||
|
<input type = "hidden" name = "answAt"
|
||||||
|
value = <c:choose>
|
||||||
|
<c:when test = "${not empty resultList.answBbscttInnb}">
|
||||||
|
'Y'
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
'N'
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>>
|
||||||
|
<input type = "hidden" name = "bbscttInnb" value = <c:out value="${resultList.bbscttInnb}"/>>
|
||||||
|
<button type = "button" class="btn outline deleteBtn"><spring:message code="button.delete"/></button>
|
||||||
|
<c:if test = "${empty resultList.answBbscttInnb}">
|
||||||
|
<button type = "button" class="btn theme outline updateBtn"><spring:message code="button.update"/></button>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4">
|
||||||
|
<div class="table__no-result">
|
||||||
|
<img src="/pc/images/icon__no-result.png" alt="조회 내역 없음">
|
||||||
|
<p class="table__no-result-text">
|
||||||
|
<spring:message code="common.nodata"/>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" id="pageIndex" name="pageIndex" value="<c:out value = '${resultMap.bbsctt.pageIndex}'/>" />
|
||||||
|
<div class="pagination__container">
|
||||||
|
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_List" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<%-- 공통 Footer --%>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/Footer.jsp"/>
|
||||||
|
<!-- 질문 삭제 모달 -->
|
||||||
|
<div id="qna-delete" class="modal alert">
|
||||||
|
<div class="alert-content">
|
||||||
|
<p class="alert-content__text--sm">
|
||||||
|
삭제된 게시글은 복구할 수 없습니다.
|
||||||
|
<br>
|
||||||
|
정말로 삭제 하시겠습니까?
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="alert-btn-container">
|
||||||
|
<a href="#" rel="modal:close" class="alert-btn alert-btn--cancel">취소</a>
|
||||||
|
<button type="button" class="alert-btn alert-btn--confirm" id = "alertDelBtn">확인</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 질문 수정 모달 -->
|
||||||
|
<div id="qna-edit" class="modal alert">
|
||||||
|
<div class="alert-content">
|
||||||
|
<p class="alert-content__text--sm">
|
||||||
|
답변이 등록된 상태입니다.
|
||||||
|
<br>
|
||||||
|
수정하실 수 없습니다.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="alert-btn-container">
|
||||||
|
<a href="#" rel="modal:close" class="alert-btn alert-btn--confirm">확인</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="modalDiv"></div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,921 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||||
|
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||||
|
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld"%>
|
||||||
|
|
||||||
|
|
||||||
|
<%--
|
||||||
|
Class Name : MyGoodsQaR.jsp
|
||||||
|
Description : 마이페이지 상품Q&A
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2024-04-11 김혜인 최초 생성
|
||||||
|
--%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<%-- 공통 include --%>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/Include.jsp"/>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
fn_collect_evt();
|
||||||
|
});
|
||||||
|
/*********************************************************
|
||||||
|
* 이벤트 함수
|
||||||
|
*********************************************************/
|
||||||
|
const fn_collect_evt = () =>{
|
||||||
|
//내용 set
|
||||||
|
fn_select_cn();
|
||||||
|
|
||||||
|
//분류 change시 hidden value값 set
|
||||||
|
$(document).on('change', '#qesitmNmC', function () {
|
||||||
|
$("#qesitmInnb").val("");
|
||||||
|
$("#qesitmNm").val("");
|
||||||
|
$("#answCn").val("");
|
||||||
|
const option = $('option:selected', this);
|
||||||
|
const qesitmInnb = $(option).attr('qesitm-innb');
|
||||||
|
const answCn = $(option).attr('answ-Cn');
|
||||||
|
const qesitmNm = $(option).attr('qesitm-nm');
|
||||||
|
if ($(this).val() !== "") {
|
||||||
|
$("#qesitmInnb").val(qesitmInnb);
|
||||||
|
$("#answCn").val(answCn);
|
||||||
|
$("#qesitmNm").val(qesitmNm);
|
||||||
|
$("#qesitmAt").val("Y");
|
||||||
|
$(this).closest("td").find("input[name='qesitmAtArr[]']").val("Y");
|
||||||
|
} else {
|
||||||
|
$("#qesitmInnb").val("");
|
||||||
|
$("#answCn").val("");
|
||||||
|
$("#qesitmNm").val("");
|
||||||
|
$("#qesitmAt").val("N");
|
||||||
|
$(this).closest("td").find("input[name='qesitmAtArr[]']").val("N");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//추가입력 항목 라디오 'click' 이벤트
|
||||||
|
$(document).on('click', '.answRadioC', function () {
|
||||||
|
const radio = $(this);
|
||||||
|
//추가입력 항목 내용 요소 get
|
||||||
|
const answ = radio.closest(".custom-radio-container").find('[name="answCnArr[]"]');
|
||||||
|
//추가입력 항목 내용 요소 get
|
||||||
|
const qesitmInnb = radio.closest(".custom-radio-container").find('[name="qesitmInnbArr[]"]');
|
||||||
|
//라디오 클릭으로 인한 제어 요소 get
|
||||||
|
const contrlTarget = radio.closest(".custom-radio-container").find('.answRadio');
|
||||||
|
//항목 고유번호 내용 요소 get
|
||||||
|
const itmInnb = radio.closest(".custom-radio-container").find('[name="itmInnbArr[]"]');
|
||||||
|
//라디오 클릭 시 disabled 비활성
|
||||||
|
if (radio.is(":checked")) {
|
||||||
|
//답변 내용 초기화
|
||||||
|
answ.val("");
|
||||||
|
const radioVal = $(radio).attr('itm-cn');
|
||||||
|
answ.val(radioVal);
|
||||||
|
//항목 내용 set
|
||||||
|
qesitmInnb.val("");
|
||||||
|
const qesitmInnbVal = $(radio).attr('qesitm-innb');
|
||||||
|
qesitmInnb.val(qesitmInnbVal);
|
||||||
|
//항목고유번호 내용 set
|
||||||
|
itmInnb.val("");
|
||||||
|
const itmInnbVal = $(radio).val();
|
||||||
|
itmInnb.val(itmInnbVal);
|
||||||
|
//라디오 주위 input값 disable false처리
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", false);
|
||||||
|
radio.closest(".custom-radio-container").find(".answRadioAt").val("Y");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", true);
|
||||||
|
radio.closest(".custom-radio-container").find(".answRadioAt").val("N");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//추가입력 항목 셀렉트 'change'이벤트
|
||||||
|
$(document).on('change', '.answSelectC', function () {
|
||||||
|
const select = $(this);
|
||||||
|
const answ = select.closest("td").find('[name="answCnArr[]"]');
|
||||||
|
const qesitmInnb = select.closest("td").find('[name="qesitmInnbArr[]"]');
|
||||||
|
const contrlTarget = select.closest("td").find('.answSelect');
|
||||||
|
const option = $('option:selected', this);
|
||||||
|
if (select.val() != "") {
|
||||||
|
//답변 내용 초기화
|
||||||
|
answ.val("");
|
||||||
|
const selectVal = $(option).attr('itm-cn');
|
||||||
|
answ.val(selectVal);
|
||||||
|
//항목 내용 set
|
||||||
|
qesitmInnb.val("");
|
||||||
|
const qesitmInnbVal = $(option).attr('qesitm-innb');
|
||||||
|
qesitmInnb.val(qesitmInnbVal);
|
||||||
|
//셀렉트 주위 input값 disable false처리
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", false);
|
||||||
|
select.closest("td").find(".answSelectAt").val("Y");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", true);
|
||||||
|
select.closest("td").find(".answSelectAt").val("N");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//추가입력 항목 체크박스 'click'이벤트
|
||||||
|
$(document).on('click', '.answChkC', function () {
|
||||||
|
const check = $(this);
|
||||||
|
const contrlTarget = check.closest("div").find('.answChk');
|
||||||
|
var isChecked = $(this).is(":checked");
|
||||||
|
//클릭한 체크박스 주위 input값 disable false처리
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
if (isChecked) {
|
||||||
|
$(this).prop("disabled", false);
|
||||||
|
} else {
|
||||||
|
$(this).prop("disabled", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 체크된 체크박스가 하나라도 있는지 확인
|
||||||
|
let anyChecked = $('.answChkC:checked').length > 0;
|
||||||
|
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
if (anyChecked) {
|
||||||
|
check.closest("td").find(".answChkAt").val("Y");
|
||||||
|
check.closest("td").find(".answChkAt").prop("disabled", false);
|
||||||
|
} else {
|
||||||
|
check.closest("td").find(".answChkAt").val("N");
|
||||||
|
check.closest("td").find(".answChkAt").prop("disabled", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//추가입력 항목 텍스트 'input'이벤트
|
||||||
|
$(document).on('input', '.answTxtC', function () {
|
||||||
|
const txt = $(this);
|
||||||
|
const contrlTarget = txt.closest("div").find('.answTxt');
|
||||||
|
const contrlAt = txt.closest("div").find('.answTxtAt');
|
||||||
|
//클릭한 체크박스 주위 input값 disable false처리
|
||||||
|
if (txt.val() != "") {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", false);
|
||||||
|
contrlAt.val("Y");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", true);
|
||||||
|
contrlAt.val("N");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//파일 업로드
|
||||||
|
$(document).on("change", "#fileUpload", function () {
|
||||||
|
addFiles(event, 0);
|
||||||
|
});
|
||||||
|
//수정 이벤트
|
||||||
|
$("#updtBtn").on("click",function (){
|
||||||
|
fn_update_bbsctt();
|
||||||
|
});
|
||||||
|
//취소시 목록 이동
|
||||||
|
$("#canclBtn").on("click",function (){
|
||||||
|
const pageIndex = $("#pageIndex").val();
|
||||||
|
fn_select_List(pageIndex);
|
||||||
|
});
|
||||||
|
$("#updtComptBtn").on("click",function(){
|
||||||
|
const updtAt = $("#updtAt").val();
|
||||||
|
if(updtAt === 'Y'){
|
||||||
|
$("#pageIndex").val("1");
|
||||||
|
}
|
||||||
|
const form = $("#bbsUpdtForm");
|
||||||
|
form.attr("action","/sopmal/mpage/act/selectGoodsQnaDtlUpdtForm");
|
||||||
|
form.attr("method","post");
|
||||||
|
form.submit();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/*********************************************************
|
||||||
|
* 게시글 내용 조회
|
||||||
|
*********************************************************/
|
||||||
|
const fn_select_cn = function () {
|
||||||
|
let bbscttInnb = $("#bbscttInnb").val();
|
||||||
|
let bbsId = $("#bbsId").val();
|
||||||
|
let sopmalCd = $("#sopmalCd").val();
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "<c:url value ='/sopmal/csc/selectBbscttCn'/>",
|
||||||
|
contentType: 'application/json',
|
||||||
|
data: JSON.stringify({
|
||||||
|
bbsId: bbsId,
|
||||||
|
bbscttInnb: bbscttInnb,
|
||||||
|
sopmalCd: sopmalCd
|
||||||
|
}),
|
||||||
|
success: function (data) {
|
||||||
|
let cn = JSON.parse(data.resBody.result).cn;
|
||||||
|
$("#cnBbsUpdt").val(cn);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/*********************************************************
|
||||||
|
* 게시글 수정
|
||||||
|
*********************************************************/
|
||||||
|
const fn_update_bbsctt = () => {
|
||||||
|
let url = '<c:url value="/sopmal/csc/updateBbscttupdt"/>';
|
||||||
|
let saveForm = $('#bbsUpdtForm');
|
||||||
|
let formData = new FormData();
|
||||||
|
|
||||||
|
//파일 업로드
|
||||||
|
if ($("#contact-dropzone").length > 0) {
|
||||||
|
let myDropzone = Dropzone.forElement("#contact-dropzone");
|
||||||
|
myDropzone.files.forEach(function (file) {
|
||||||
|
formData.append("files", file);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//사용자 등록 시 노출 여부 Y
|
||||||
|
formData.append("expsrAt", "Y");
|
||||||
|
//입력항목 체크박스 disabled처리
|
||||||
|
$('.checkbox input[type="checkbox"]').each(function () {
|
||||||
|
if (!$(this).prop('checked')) {
|
||||||
|
fn_ctrl_disable([".checkbox"],);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//폼 내 input값 append
|
||||||
|
saveForm.serializeArray().forEach(function (item) {
|
||||||
|
formData.append(item.name, item.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
//사용자 등록 시 노출 여부 Y
|
||||||
|
if (confirm('게시글을 <spring:message code="confirm.common.update"/>')) {
|
||||||
|
$.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: url,
|
||||||
|
enctype:"multipart/form-data",
|
||||||
|
data: formData,
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
success: function (result) {
|
||||||
|
$("#result-alert").modal();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
fn_ctrl_disable("", [".checkbox"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*********************************************************
|
||||||
|
* 목록 이동
|
||||||
|
*********************************************************/
|
||||||
|
const fn_select_List = (pageIndex) => {
|
||||||
|
if(!pageIndex){
|
||||||
|
pageIndex = 1;
|
||||||
|
}
|
||||||
|
const form = $('<form>', {
|
||||||
|
'action': '/sopmal/mpage/act/selectNormalQnaInqire',
|
||||||
|
'method': 'post'
|
||||||
|
}).append(
|
||||||
|
$('<input>', {
|
||||||
|
'type': 'hidden',
|
||||||
|
'name': 'bbsId',
|
||||||
|
'value': $("#bbsId").val()
|
||||||
|
})
|
||||||
|
).append(
|
||||||
|
$('<input>', {
|
||||||
|
'type': 'hidden',
|
||||||
|
'name': 'pageIndex',
|
||||||
|
'value': pageIndex
|
||||||
|
})
|
||||||
|
);
|
||||||
|
$('body').append(form);
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
function fn_update_hidden_value () {
|
||||||
|
//분류 항목
|
||||||
|
const option = $('option:selected', $("#qesitmNmC"));
|
||||||
|
const qesitmInnb = $(option).attr('qesitm-innb');
|
||||||
|
const answCn = $(option).attr('answ-Cn');
|
||||||
|
const qesitmNm = $(option).attr('qesitm-nm');
|
||||||
|
if($("#qesitmNmC").val()!= ""){
|
||||||
|
$("#qesitmInnb").val(qesitmInnb);
|
||||||
|
$("#answCn").val(answCn);
|
||||||
|
$("#qesitmAt").val("Y");
|
||||||
|
}else{
|
||||||
|
$("#qesitmInnb").val("");
|
||||||
|
$("#answCn").val("");
|
||||||
|
$("#qesitmAt").val("N");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 추가평가항목 라디오
|
||||||
|
const radio = $(".answRadioC:checked");
|
||||||
|
|
||||||
|
radio.each(function(idx) {
|
||||||
|
if (radio.eq(idx).val()) {
|
||||||
|
let radioAnsw = radio.eq(idx).closest("td").find('[name="answCnArr[]"]');
|
||||||
|
let radioQesitmInnb = radio.eq(idx).closest("td").find('[name="qesitmInnbArr[]"]');
|
||||||
|
let radioItmInnb = radio.eq(idx).closest("td").find('[name="itmInnbArr[]"]');
|
||||||
|
let radioQesitmAt = radio.eq(idx).closest("td").find('[name="qesitmAtArr[]"]');
|
||||||
|
let radioContrlTarget = radio.eq(idx).closest("td").find('.answRadio');
|
||||||
|
|
||||||
|
// 답변 내용 set
|
||||||
|
radioAnsw.val(radio.eq(idx).attr('itm-cn'));
|
||||||
|
// 항목 내용 set
|
||||||
|
radioQesitmInnb.val(radio.eq(idx).attr('qesitm-innb'));
|
||||||
|
// 항목고유번호 내용 set
|
||||||
|
radioItmInnb.val(radio.eq(idx).val());
|
||||||
|
// 답변 여부
|
||||||
|
radioQesitmAt.val("Y");
|
||||||
|
|
||||||
|
// 라디오 주위 input값 disable false처리
|
||||||
|
radioContrlTarget.each(function(idx){
|
||||||
|
radioContrlTarget.eq(idx).prop("disabled", false);
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
let radioAnsw = radio.eq(idx).closest("td").find('[name="answCnArr[]"]');
|
||||||
|
let radioQesitmInnb = radio.eq(idx).closest("td").find('[name="qesitmInnbArr[]"]');
|
||||||
|
let radioItmInnb = radio.eq(idx).closest("td").find('[name="itmInnbArr[]"]');
|
||||||
|
let radioQesitmAt = radio.eq(idx).closest("td").find('[name="qesitmAtArr[]"]');
|
||||||
|
let radioContrlTarget = radio.eq(idx).closest("div").find('.answRadio');
|
||||||
|
// 답변 내용 set
|
||||||
|
radioAnsw.val("");
|
||||||
|
// 항목 내용 set
|
||||||
|
radioQesitmInnb.val("");
|
||||||
|
// 항목고유번호 내용 set
|
||||||
|
radioItmInnb.val("");
|
||||||
|
// 답변 여부
|
||||||
|
radioQesitmAt.val("N");
|
||||||
|
// 라디오 주위 input값 disable false처리
|
||||||
|
radioContrlTarget.each(function(idx){
|
||||||
|
radioContrlTarget.eq(idx).prop("disabled", true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//추가입력 항목 셀렉트 'change'이벤트
|
||||||
|
const select =$('select.answSelectC[name="itmInnbArr[]"]');
|
||||||
|
select.each(function(idx) {
|
||||||
|
let selectIndex = select.eq(idx).find('option:selected').index();
|
||||||
|
if (selectIndex > 0) {
|
||||||
|
let selectQesitmAt = select.eq(idx).closest("td").find('[name="qesitmAtArr[]"]');
|
||||||
|
let selectQesitmInnb = select.eq(idx).closest("td").find('[name="qesitmInnbArr[]"]');
|
||||||
|
let selectAnsw = select.eq(idx).closest("td").find('[name="answCnArr[]"]');
|
||||||
|
let selectOption = $('option:selected', select.eq(idx));
|
||||||
|
let selectContrlTarget = select.eq(idx).closest("td").find('.answSelect');
|
||||||
|
// 답변 여부
|
||||||
|
selectQesitmAt.val("Y");
|
||||||
|
// 항목 내용 set
|
||||||
|
selectQesitmInnb.val(selectOption.attr('qesitm-innb'));
|
||||||
|
// 답변 내용 set
|
||||||
|
selectAnsw.val(selectOption.attr('itm-cn'));
|
||||||
|
// 라디오 주위 input값 disable false처리
|
||||||
|
selectContrlTarget.each(function(idx){
|
||||||
|
selectContrlTarget.eq(idx).prop("disabled", false);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let selectQesitmAt = select.eq(idx).closest("td").find('[name="qesitmAtArr[]"]');
|
||||||
|
let selectQesitmInnb = select.eq(idx).closest("td").find('[name="qesitmInnbArr[]"]');
|
||||||
|
let selectAnsw = select.eq(idx).closest("td").find('[name="answCnArr[]"]');
|
||||||
|
let selectContrlTarget = select.eq(idx).closest("td").find('.answSelect');
|
||||||
|
// 답변 여부
|
||||||
|
selectQesitmAt.val("N");
|
||||||
|
// 항목 내용 set
|
||||||
|
selectQesitmInnb.val("");
|
||||||
|
// 답변 내용 set
|
||||||
|
selectAnsw.val("");
|
||||||
|
// 라디오 주위 input값 disable false처리
|
||||||
|
selectContrlTarget.each(function(idx){
|
||||||
|
selectContrlTarget.eq(idx).prop("disabled", true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const check = $(".answChkC");
|
||||||
|
//클릭한 체크박스 주위 input값 disable false처리
|
||||||
|
check.each(function(idx){
|
||||||
|
let checkContrlTarget = check.eq(idx).closest(".checkbox").find('.answChk');
|
||||||
|
let isChecked = check.eq(idx).is(":checked");
|
||||||
|
|
||||||
|
checkContrlTarget.each(function (index) {
|
||||||
|
if (isChecked) {
|
||||||
|
checkContrlTarget.eq(index).prop("disabled", false);
|
||||||
|
} else {
|
||||||
|
checkContrlTarget.eq(index).prop("disabled", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 체크된 체크박스가 하나라도 있는지 확인
|
||||||
|
let anyChecked = check.eq(idx).closest("td").find(".answChkC:checked").length > 0;
|
||||||
|
if (anyChecked) {
|
||||||
|
check.eq(idx).closest("td").find(".answChkAt").val("Y");
|
||||||
|
} else {
|
||||||
|
check.eq(idx).closest("td").find(".answChkAt").val("N");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//추가입력 항목 텍스트 'input'이벤트
|
||||||
|
const txt = $('.answTxtC');
|
||||||
|
txt.each(function (idx) {
|
||||||
|
let contrlTarget = txt.eq(idx).closest("div").find('.answTxt');
|
||||||
|
let contrlAt = txt.eq(idx).closest("div").find('.answTxtAt');
|
||||||
|
//클릭한 체크박스 주위 input값 disable false처리
|
||||||
|
if (txt.val() != "") {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", false);
|
||||||
|
contrlAt.val("Y");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", true);
|
||||||
|
contrlAt.val("N");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/*상품qna 버튼 클릭 제어*/
|
||||||
|
function fn_prevent_click(event) {
|
||||||
|
event.preventDefault(); // 체크박스 상태 변경 방지
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<c:set value="${resultMap.bbscttInfo.bbscttInfo}" var="bbscttInfo"/>
|
||||||
|
<c:set value="${resultMap.bbscttVO}" var="bbscttVO"/>
|
||||||
|
<c:set value="${resultMap.bbscttInfo.qesitmAnswList}" var="qesitmAnswList"/>
|
||||||
|
<c:set value="${resultMap.bbscttInfo.fileInfoGson}" var="fileInfoGson"/>
|
||||||
|
<c:set value="${resultMap.bbscttInfo.goods}" var="goods"/>
|
||||||
|
<c:set value="${resultMap.bbscttInfo.wrter}" var="wrter"/>
|
||||||
|
<c:set value="${resultMap.bbsInfo}" var="bbsInfo"/>
|
||||||
|
<c:set value="${resultMap.qesitmList.qesitmList}" var="qesitmList"/>
|
||||||
|
<c:set value="${resultMap.qesitmList.itmCnList}" var="itmCnList"/>
|
||||||
|
<c:set value="${resultMap.itmList}" var="itmList"/>
|
||||||
|
<%-- 공통 Header --%>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/Header.jsp"/>
|
||||||
|
<!-- 메인 컨텐츠 영역 -->
|
||||||
|
<main>
|
||||||
|
<form id = "bbsUpdtForm">
|
||||||
|
<input type="hidden" name="dftCnUseAt" value="<c:out value = '${bbsInfo.dftCnUseAt}'/>" id="dftCnUseAt">
|
||||||
|
<input type="hidden" name="dftCn" value="<c:out value = '${bbsInfo.dftCn}'/>" id="dftCn">
|
||||||
|
<input type="hidden" name="slangFlter" value="<c:out value = '${bbsInfo.slangFlter}'/>">
|
||||||
|
<input type="hidden" name="password" value="<c:out value = '${bbscttInfo.password}'/>">
|
||||||
|
<input type="hidden" name="cmUseAt" value="<c:out value = '${bbscttInfo.cmUseAt}'/>">
|
||||||
|
<input type="hidden" name="sortOrdr" value="<c:out value = '${bbscttInfo.sortOrdr}'/>">
|
||||||
|
<input type="hidden" name="bbscttInnb" value="<c:out value = '${bbscttInfo.bbscttInnb}'/>" id="bbscttInnb">
|
||||||
|
<input type="hidden" name="bbsId" value="<c:out value = '${bbscttInfo.bbsId}'/>" id="bbsId">
|
||||||
|
<input type="hidden" name="pageIndex" value="<c:out value = '${bbsctt.pageIndex}'/>" id="pageIndex">
|
||||||
|
<spring:eval expression="@environment.getProperty('sopmalfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/> <%--허용 확장자--%>
|
||||||
|
<input type="hidden" name="acceptFileExtensions" value="<c:out value = '${acceptFileExtensions}'/>" id="acceptFileExtensions">
|
||||||
|
<input type="hidden" name="filAtch" value="${bbsInfo.filAtch }"/>
|
||||||
|
<input type="hidden" id="updtAt">
|
||||||
|
<input type="hidden" id="sopmalCd" value="<c:out value="${bbsInfo.sopmalCd}"/>" name="sopmalCd"/>
|
||||||
|
<input type="hidden" id="updtAt">
|
||||||
|
|
||||||
|
<%--존재 파일 여부 체크--%>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test = "${not empty fileInfo}"><c:set var="filExtAt" value="Y"/></c:when>
|
||||||
|
<c:otherwise><c:set var="filExtAt" value="N"/></c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
<input type="hidden" id="filExtAt" name="filExtAt" value="${filExtAt}"/>
|
||||||
|
<input type="hidden" id="extFiles" name="extFiles" value=""/>
|
||||||
|
<input type="hidden" id="filesInfo" name="filesInfo"/>
|
||||||
|
<input type="hidden" id="extFilChangeAt" name="extFilChangeAt" value="N"/>
|
||||||
|
<spring:eval expression="@environment.getProperty('sopmalfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||||
|
<div class="sub-wrapper">
|
||||||
|
<div class="sub-content">
|
||||||
|
<div class="sub-rl">
|
||||||
|
<%-- 마이페이지 Left 영역 --%>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mpage/MypageLeft.jsp"/>
|
||||||
|
<div class="sub-right-content">
|
||||||
|
<%-- 마이페이지 Right 영역 --%>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mpage/MypageRight.jsp"/>
|
||||||
|
<div class="sub-right-content__section">
|
||||||
|
<h3 class="sub-right-content__title"><c:out value="${bbsInfo.bbsNm}"/></h3>
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table class="table write">
|
||||||
|
<caption>해당 테이블에 대한 설명</caption>
|
||||||
|
<!-- 각 열 width 설정 -->
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 140px;">
|
||||||
|
<col style="width: auto;">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>작성자</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner"><c:out value="${bbscttInfo.regusrNm}"/></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<c:if test="${bbsInfo.answRegist eq 'Y'&& bbsInfo.bbscttSndngMthCd ne '03'}"><%--답변사용여부와 게시글 문자사용여부 체크--%>
|
||||||
|
<tr>
|
||||||
|
<th>답변받기</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<input class="input-text" type="text" title="해당 인풋에 대한 설명" name="answMbtlnb"
|
||||||
|
id="answMbtlnb" maxlength="13" value = "<c:out value = '${bbscttInfo.answMbtlnb}'/>"
|
||||||
|
placeholder="휴대폰번호'-'없이 입력">
|
||||||
|
<div class="b-checkbox-container">
|
||||||
|
<label class="b-checkbox checkbox">
|
||||||
|
<input type="checkbox" value="Y" name="answSmsRecptn" class="chkAt"
|
||||||
|
<c:if test="${bbscttInfo.answSmsRecptn eq 'Y'}">checked</c:if>>
|
||||||
|
<span class="check"></span>
|
||||||
|
<span class="control-label">SMS 알림요청</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${not empty qesitmAnswList}">
|
||||||
|
<tr>
|
||||||
|
<th>문의유형<span class="required-asterisk">*</span></th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<div class="select-box">
|
||||||
|
<%--문항답변필수여부 --%>
|
||||||
|
<input type="hidden" name="qesitmEssntlAtArr[]" value="Y">
|
||||||
|
<%--문항명 --%>
|
||||||
|
<input type="hidden" name="qesitmNmArr[]" id="qesitmNm"
|
||||||
|
value="분류"/>
|
||||||
|
<%--문항고유번호 --%>
|
||||||
|
<input type="hidden" name="qesitmInnbArr[]" id="qesitmInnb"
|
||||||
|
<c:forEach var="itmAnswList" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${itmAnswList.aditItmDvCd eq '03'}">
|
||||||
|
value = <c:out
|
||||||
|
value="${itmAnswList.qesitmInnb}"/>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>/>
|
||||||
|
<%--답변내용 --%>
|
||||||
|
<input type="hidden" name="answCnArr[]" id="answCn"
|
||||||
|
<c:forEach var="itmAnswList" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${itmAnswList.aditItmDvCd eq '03'}">
|
||||||
|
value = <c:out value="${itmAnswList.answCn}"/>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>/>
|
||||||
|
<%--답변여부 --%>
|
||||||
|
<input type="hidden" name="qesitmAtArr[]" id="qesitmAt"
|
||||||
|
<c:forEach var="itmAnswList" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${itmAnswList.aditItmDvCd eq '03'}">
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${empty itmAnswList.answCn}">value="N"</c:when>
|
||||||
|
<c:otherwise>value="Y"</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>>
|
||||||
|
<select class="md" id="qesitmNmC" name="itmInnbArr[]">
|
||||||
|
<option value="">분류 선택</option>
|
||||||
|
<c:forEach var="itm" items="${itmList}" varStatus="status">
|
||||||
|
<option value="<c:out value="${itm.itmInnb}"/>"
|
||||||
|
qesitm-innb="${itm.qesitmInnb}"
|
||||||
|
answ-Cn="${itm.itmCn}"
|
||||||
|
qesitm-nm="${itm.qesitmNm}"
|
||||||
|
<%--분류 답변 값 유지--%>
|
||||||
|
<c:forEach var="itmAnswList"
|
||||||
|
items="${qesitmAnswList}">
|
||||||
|
<c:if test="${itmAnswList.aditItmDvCd eq '03'}">
|
||||||
|
<c:if test="${itm.itmInnb eq itmAnswList.itmInnb }">selected</c:if>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>>
|
||||||
|
<c:out value="${itm.itmCn}"/>
|
||||||
|
</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${not empty qesitmList}">
|
||||||
|
<c:forEach var="qesitmList" items="${qesitmList}">
|
||||||
|
<tr>
|
||||||
|
<c:if test="${ qesitmList.itmTyCd eq '01'}">
|
||||||
|
<th><c:out value="${ qesitmList.qesitmNm }"/><c:if
|
||||||
|
test="${qesitmList.qesitmEssntlAt eq 'Y'}"><span
|
||||||
|
class="required-asterisk">*</span></c:if></th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<div class="custom-radio-container">
|
||||||
|
<input type="hidden" name="qesitmEssntlAtArr[]"
|
||||||
|
value="${ qesitmList.qesitmEssntlAt}"
|
||||||
|
class="essntlChk">
|
||||||
|
<input type="hidden" name="qesitmNmArr[]"
|
||||||
|
value="${ qesitmList.qesitmNm}">
|
||||||
|
<input type="hidden" name="qesitmAtArr[]"
|
||||||
|
class="answRadioAt qesitmAtChk" value="N">
|
||||||
|
<input type="hidden" name="qesitmInnbArr[]"
|
||||||
|
class="answRadio"
|
||||||
|
value="${ qesitmList.qesitmInnb }" disabled>
|
||||||
|
<input type="hidden" name="answCnArr[]" class="answRadio"
|
||||||
|
disabled>
|
||||||
|
<input type="hidden" name="itmInnbArr[]" class="answRadio"
|
||||||
|
disabled>
|
||||||
|
<c:forEach items="${itmCnList}" var="itmCnList1" varStatus="status">
|
||||||
|
<c:if test="${itmCnList1.qesitmInnb eq qesitmList.qesitmInnb}">
|
||||||
|
<div class="custom-radio is-medium">
|
||||||
|
<input type="radio" id="answCn${ status.index }"
|
||||||
|
class="answRadioC"
|
||||||
|
qesitm-innb='${itmCnList1.qesitmInnb}'
|
||||||
|
name="itmInnbArr${ qesitmList.qesitmInnb}[]"
|
||||||
|
value="${ itmCnList1.itmInnb}"
|
||||||
|
itm-cn="${ itmCnList1.itmCn }"
|
||||||
|
<c:forEach var="qesitmAnswList1" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${qesitmAnswList1.itmTyCd eq '01'}">
|
||||||
|
<c:if test="${qesitmAnswList1.itmInnb eq itmCnList1.itmInnb}">checked</c:if>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>>
|
||||||
|
<label for="answCn${ status.index }">${ itmCnList1.itmCn }</label>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${ qesitmList.itmTyCd eq '02'}">
|
||||||
|
<th><c:out value="${ qesitmList.qesitmNm }"/><c:if
|
||||||
|
test="${qesitmList.qesitmEssntlAt eq 'Y'}"><span
|
||||||
|
class="required-asterisk">*</span></c:if></th>
|
||||||
|
<td>
|
||||||
|
<input type="hidden" name="qesitmEssntlAtArr[]"
|
||||||
|
value="${ qesitmList.qesitmEssntlAt }" class="essntlChk">
|
||||||
|
<input type="hidden" name="qesitmNmArr[]"
|
||||||
|
value="${ qesitmList.qesitmNm }">
|
||||||
|
<input type="hidden" name="qesitmAtArr[]"
|
||||||
|
class="answSelectAt qesitmAtChk" value="N">
|
||||||
|
<input type="hidden" name="qesitmInnbArr[]" class="answSelect"
|
||||||
|
value="${ qesitmList.qesitmInnb }" disabled>
|
||||||
|
<input type="hidden" name="answCnArr[]" class="answSelect" disabled>
|
||||||
|
<div class="select-box">
|
||||||
|
<select class="md answSelectC" name="itmInnbArr[]">
|
||||||
|
<option value="">전체</option>
|
||||||
|
<c:forEach items="${itmCnList}" var="itmCnList2">
|
||||||
|
<c:if test="${itmCnList2.qesitmInnb eq qesitmList.qesitmInnb}">
|
||||||
|
<c:set var="selected" value=""/>
|
||||||
|
<c:forEach var="qesitmAnswList2" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${qesitmAnswList2.itmInnb eq itmCnList2.itmInnb}">
|
||||||
|
<c:set var="selected" value="selected"/>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
<option value="${itmCnList2.itmInnb}"
|
||||||
|
itm-cn="${itmCnList2.itmCn}"
|
||||||
|
qesitm-innb="${itmCnList2.qesitmInnb}" ${selected}>
|
||||||
|
${itmCnList2.itmCn}
|
||||||
|
</option>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${ qesitmList.itmTyCd eq '03'}">
|
||||||
|
<th><c:out value="${ qesitmList.qesitmNm }"/><c:if
|
||||||
|
test="${qesitmList.qesitmEssntlAt eq 'Y'}"><span
|
||||||
|
class="required-asterisk">*</span></c:if></th>
|
||||||
|
<td>
|
||||||
|
<input type="hidden" name="qesitmEssntlAtArr[]"
|
||||||
|
value="${ qesitmList.qesitmEssntlAt }" class="essntlChk">
|
||||||
|
<input type="hidden" name="qesitmNmArr[]"
|
||||||
|
value="${ qesitmList.qesitmNm }">
|
||||||
|
<input type="hidden" name="qesitmAtArr[]"
|
||||||
|
class="answChkAt qesitmAtChk"
|
||||||
|
value="N">
|
||||||
|
<c:forEach items="${itmCnList}" var="itmCnList3">
|
||||||
|
<c:if test="${itmCnList3.qesitmInnb eq qesitmList.qesitmInnb}">
|
||||||
|
<div class="input-container">
|
||||||
|
<label class="b-checkbox checkbox">
|
||||||
|
<input type="hidden" class="answChk" name="qesitmInnbArr[]"
|
||||||
|
value="${ qesitmList.qesitmInnb }" disabled>
|
||||||
|
<input type="hidden" class="answChk" name="answCnArr[]"
|
||||||
|
value="${ itmCnList3.itmCn }" disabled>
|
||||||
|
<input type="checkbox" class="answChkC" name="itmInnbArr[]"
|
||||||
|
value="${ itmCnList3.itmInnb }"
|
||||||
|
itm-cn="${ itmCnList3.itmCn }"
|
||||||
|
qesitm-innb="${itmCnList3.qesitmInnb}"
|
||||||
|
<c:forEach var="qesitmAnswList3" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${qesitmAnswList3.itmInnb eq itmCnList3.itmInnb}">checked</c:if>
|
||||||
|
</c:forEach>>
|
||||||
|
<span class="check"></span>
|
||||||
|
<span class="control-label">${ itmCnList3.itmCn }</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</td>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${ qesitmList.itmTyCd eq '04'}">
|
||||||
|
<th><c:out value="${ qesitmList.qesitmNm }"/><c:if
|
||||||
|
test="${qesitmList.qesitmEssntlAt eq 'Y'}"><span
|
||||||
|
class="required-asterisk">*</span></c:if></th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<div class="input-grow-container">
|
||||||
|
<c:forEach items="${itmCnList}" var="itmCnList4">
|
||||||
|
<c:if test="${itmCnList4.qesitmInnb eq qesitmList.qesitmInnb}">
|
||||||
|
<div class="input-container">
|
||||||
|
<input type="hidden" name="qesitmEssntlAtArr[]"
|
||||||
|
value="${ qesitmList.qesitmEssntlAt }">
|
||||||
|
<input type="hidden" name="qesitmNmArr[]"
|
||||||
|
value="${ qesitmList.qesitmNm }">
|
||||||
|
<input type="hidden" name="qesitmAtArr[]"
|
||||||
|
class="answTxtAt" value="N">
|
||||||
|
<input type="hidden" class="answTxt"
|
||||||
|
name="qesitmInnbArr[]"
|
||||||
|
value="${ qesitmList.qesitmInnb }" disabled>
|
||||||
|
<input type="text" class="input-text mm answTxtC"
|
||||||
|
name="answCnArr[]" title="추가문항답변"
|
||||||
|
placeholder="${ itmCnList4.itmCn }"
|
||||||
|
maxlength="666"
|
||||||
|
itm-cn="${ itmCnList4.itmCn }"
|
||||||
|
qesitm-innb="${itmCnList4.qesitmInnb}"
|
||||||
|
itm-innb="${itmCnList4.itmInnb}"
|
||||||
|
<c:forEach var="qesitmAnswList4"
|
||||||
|
items="${qesitmAnswList}">
|
||||||
|
<c:if test="${qesitmAnswList4.itmInnb eq itmCnList4.itmInnb}">
|
||||||
|
value="<c:out value = '${qesitmAnswList4.answCn}'/>"
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>>
|
||||||
|
<input type="hidden" class="answTxt" name="itmInnbArr[]"
|
||||||
|
value="${ itmCnList4.itmInnb }" disabled>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</c:if>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</c:if>
|
||||||
|
<tr>
|
||||||
|
<th>제목</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<input class="input-text xl" type="text" title="해당 인풋에 대한 설명"
|
||||||
|
name="sj"
|
||||||
|
placeholder="제목을 입력하세요." maxlength="100"
|
||||||
|
value="<c:out value = "${bbscttInfo.sj}"/>">
|
||||||
|
<c:if test="${bbsInfo.secretBbsctt eq 'Y'}">
|
||||||
|
<div class="b-checkbox-container">
|
||||||
|
<label class="b-checkbox checkbox">
|
||||||
|
<input type="checkbox" value="Y" name="secretBbscttAt"
|
||||||
|
<c:if test="${bbscttInfo.secretBbscttAt eq 'Y'}">checked</c:if>
|
||||||
|
onclick="fn_prevent_click(event);">
|
||||||
|
<span class="check"></span>
|
||||||
|
<span class="control-label">비밀글</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>내용</th>
|
||||||
|
<td>
|
||||||
|
<textarea class="textarea" rows="12" title="내용 입력란" name="cn"
|
||||||
|
id="cnBbsUpdt"><c:out value="${bbscttInfo.cn}" escapeXml="false"/></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%--게시판설정(파일첨부사용여부)--%>
|
||||||
|
<c:if test="${bbsInfo.filAtch eq 'Y'}">
|
||||||
|
<tr>
|
||||||
|
<th>이미지 등록</th>
|
||||||
|
<td>
|
||||||
|
<div class="dropzone-wrapper">
|
||||||
|
<div class="dropzone" id="contact-dropzone">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ul class="contact-upload-info">
|
||||||
|
<li>사진 첨부는 최대 10MB 이하이며 3개까지 등록할 수 있습니다.</li>
|
||||||
|
<li>등록 가능 파일은 ${acceptFileExtensions} 파일만 가능합니다.</li>
|
||||||
|
<li>상품과 무관한 내용이거나 음란 불법적인 내용은 통보없이 삭제할 수 있습니다.</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:if>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="sub-bottom-btn-container">
|
||||||
|
<button type="button" class="btn xl outline" id="canclBtn"><spring:message code="button.close"/></button>
|
||||||
|
<button type="button" class="btn xl theme" id="updtBtn"><spring:message code="button.update"/></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
<%-- 공통 Footer --%>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/Footer.jsp"/>
|
||||||
|
<!-- 수정/등록 알림 -->
|
||||||
|
<div id="result-alert" class="modal alert">
|
||||||
|
<div class="alert-content">
|
||||||
|
<p class="alert-content__text--sm">
|
||||||
|
게시글을 수정하였습니다.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="alert-btn-container">
|
||||||
|
<a href="#" rel="modal:close" class="alert-btn alert-btn--confirm" id = "updtComptBtn">확인</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
// Dropzone 파일업로드
|
||||||
|
if ($("#contact-dropzone").length > 0) {
|
||||||
|
const maxFiles = 3;
|
||||||
|
Dropzone.autoDiscover = false;
|
||||||
|
var myDropzone = new Dropzone("#contact-dropzone", {
|
||||||
|
url: "/file-upload",
|
||||||
|
maxFilesize: 10,
|
||||||
|
maxFiles: maxFiles,
|
||||||
|
acceptedFiles: "${acceptFileExtensions}",
|
||||||
|
autoProcessQueue: false,
|
||||||
|
addRemoveLinks: true,
|
||||||
|
dictDefaultMessage: "",
|
||||||
|
dictRemoveFile: "삭제",
|
||||||
|
dictCancelUpload: "취소",
|
||||||
|
dictCancelUploadConfirmation: "업로드를 취소하시겠습니까?",
|
||||||
|
dictInvalidFileType: "이 파일은 업로드할 수 없습니다.",
|
||||||
|
dictFileTooBig: "파일이 너무 큽니다. ({{filesize}}MB). 최대 파일 크기: {{maxFilesize}}MB.",
|
||||||
|
dictMaxFilesExceeded: "파일을 더 이상 추가할 수 없습니다.",
|
||||||
|
dictResponseError: "서버에서 응답을 받지 못했습니다.",
|
||||||
|
init: function () {
|
||||||
|
let dropzoneInstance = this;
|
||||||
|
let imageData = ${fileInfoGson};
|
||||||
|
// 각 이미지를 Dropzone에 추가
|
||||||
|
$.each(imageData, function (index, image) {
|
||||||
|
// Dropzone 파일 객체 생성
|
||||||
|
let mockFile = {name: image.orginlFilNm, size: image.filMg};
|
||||||
|
|
||||||
|
dropzoneInstance.emit("addedfile", mockFile);
|
||||||
|
const cdnurl = '<c:out value="${cdnurl}"/>';
|
||||||
|
const imagePath =cdnurl+image.filCours + image.sysFilNm;
|
||||||
|
dropzoneInstance.emit("thumbnail", mockFile, imagePath);
|
||||||
|
|
||||||
|
// 이미지 오류 처리
|
||||||
|
$(mockFile.previewElement).find("img").on("error", function () {
|
||||||
|
this.src = '/pc/images/image_placeholder.png'; // 대체 이미지 경로로 설정
|
||||||
|
});
|
||||||
|
|
||||||
|
// Dropzone에 파일 추가
|
||||||
|
mockFile.customId = image.bbscttAtchmnfilInnb;
|
||||||
|
dropzoneInstance.files.push(mockFile);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 파일이 삭제될 때마다 호출되는 이벤트 핸들러
|
||||||
|
this.on("removedfile", function (file) {
|
||||||
|
const result = dropzoneDeleteFiles("" + file.customId + "", '<c:out value="${bbscttVO.sopmalCd}"/>', "BDFL", 1);
|
||||||
|
if (result === "N") {//파일 삭제 안할 시 복원
|
||||||
|
file.customData = {restored: true, customId: file.customId}; //삭제 취소에 의한 구분자 부여
|
||||||
|
myDropzone.emit("addedfile", file); // 파일을 다시 추가하여 삭제 취소
|
||||||
|
myDropzone.emit("thumbnail", file, file.dataURL); // 파일의 썸네일을 복원
|
||||||
|
}
|
||||||
|
if (myDropzone.files.length < maxFiles) {
|
||||||
|
$(".dz-message").show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//파일 추가
|
||||||
|
this.on("addedfile", function (file) {
|
||||||
|
let restoreAt = '';
|
||||||
|
if (file.customData) { //파일 삭제 복구시
|
||||||
|
restoreAt = true;
|
||||||
|
} else {//새파일 추가시
|
||||||
|
restoreAt = false;
|
||||||
|
}
|
||||||
|
if (restoreAt) {// 파일 삭제 복구시 해당 id 재부여
|
||||||
|
file.customId = file.customData.customId;
|
||||||
|
} else {//새파일 추가시 임시 id 부여
|
||||||
|
let fileLength = myDropzone.files.length;
|
||||||
|
file.customId = "temp" + fileLength;
|
||||||
|
if (fileLength > maxFiles) {
|
||||||
|
const dictMaxFilesExceeded = myDropzone.options.dictMaxFilesExceeded;
|
||||||
|
alert(dictMaxFilesExceeded);
|
||||||
|
this.removeFile(file);
|
||||||
|
$(file.previewElement).find(".dz-remove").attr("disabled", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// maxFiles 제한 관련 이벤트 핸들러
|
||||||
|
this.on("maxfilesexceeded", function (file) {
|
||||||
|
const dictMaxFilesExceeded = myDropzone.options.dictMaxFilesExceeded;
|
||||||
|
alert(dictMaxFilesExceeded);
|
||||||
|
this.removeFile(file);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var inputElement = $('input[type="file"].dz-hidden-input');
|
||||||
|
|
||||||
|
// name 부여
|
||||||
|
inputElement.attr('name', 'file');
|
||||||
|
|
||||||
|
// id 부여
|
||||||
|
inputElement.attr('id', 'fileUpload');
|
||||||
|
|
||||||
|
if (myDropzone.files.length < maxFiles) {
|
||||||
|
$(".dz-message").show();
|
||||||
|
} else {
|
||||||
|
$(".dz-message").hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
@@ -60,7 +60,7 @@ const fn_regist_mbr_secsn = function () {
|
|||||||
data: {secsnResn: secsnResn},
|
data: {secsnResn: secsnResn},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
alert('정상적으로 탈퇴 되었습니다.');
|
alert('정상적으로 탈퇴 되었습니다.');
|
||||||
location.href ="/logout";
|
location.href ="/sopmal/logout";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1500,6 +1500,9 @@
|
|||||||
<div class="multiDeliveryStatus">
|
<div class="multiDeliveryStatus">
|
||||||
<p class="multiDeliveryStatus__title">총 <em><c:out value="${fn:length(data.shippingList)}"/>곳</em>의 배송지로 주문하셨습니다.</p>
|
<p class="multiDeliveryStatus__title">총 <em><c:out value="${fn:length(data.shippingList)}"/>곳</em>의 배송지로 주문하셨습니다.</p>
|
||||||
<c:choose>
|
<c:choose>
|
||||||
|
<c:when test="${order.ordrSttusCd == 15}">
|
||||||
|
<a href="javascript:void(0);" onclick="fn_post_cancl_ordr('<c:out value="${order.sopmalCd}"/>', '<c:out value="${order.ordrInnb}"/>', '<c:out value="${order.ordrSttusCd}"/>');" class="btn gray2">주문취소</a>
|
||||||
|
</c:when>
|
||||||
<c:when test="${order.ordrSttusCd == 25}">
|
<c:when test="${order.ordrSttusCd == 25}">
|
||||||
<a href="javascript:void(0);" onclick="fn_call_setle_cancl_pop('<c:out value="${order.sopmalCd}"/>', '<c:out value="${order.ordrInnb}"/>', '', '<c:out value="${setleDt}"/>', '<c:out value="${setleTyCd}"/>', '<c:out value="${order.ordrSttusCd}"/>');" class="btn gray2">전체 결제취소</a>
|
<a href="javascript:void(0);" onclick="fn_call_setle_cancl_pop('<c:out value="${order.sopmalCd}"/>', '<c:out value="${order.ordrInnb}"/>', '', '<c:out value="${setleDt}"/>', '<c:out value="${setleTyCd}"/>', '<c:out value="${order.ordrSttusCd}"/>');" class="btn gray2">전체 결제취소</a>
|
||||||
</c:when>
|
</c:when>
|
||||||
|
|||||||
@@ -2339,49 +2339,66 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
table += ' <tr>';
|
table += ' <tr>';
|
||||||
table += ' <th>발급정보</th>';
|
table += ' <th></th>';
|
||||||
table += ' <td>';
|
table += ' <td>';
|
||||||
table += ' <div class="td-inner">';
|
table += ' <div style="display: none">';
|
||||||
table += ' <div class="custom-radio-container">';
|
table += ' <div class="custom-radio-container">';
|
||||||
table += ' <div class="custom-radio is-medium">';
|
table += ' <div class="custom-radio is-medium">';
|
||||||
table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtN_' + id + '" value="" checked>';
|
table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtN_' + id + '" value="" checked>';
|
||||||
table += ' <label for="cshRciptIssuAtN_' + id + '">발급안함</label>';
|
// table += ' <label for="cshRciptIssuAtN_' + id + '">발급안함</label>';
|
||||||
table += ' </div>';
|
table += ' </div>';
|
||||||
table += ' <div class="custom-radio is-medium">';
|
table += ' <div class="custom-radio is-medium">';
|
||||||
table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtY_' + id + '" value="01" >';
|
table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtY_' + id + '" value="01" >';
|
||||||
table += ' <label for="cshRciptIssuAtY_' + id + '">현금영수증</label>';
|
// table += ' <label for="cshRciptIssuAtY_' + id + '">현금영수증</label>';
|
||||||
table += ' </div>';
|
table += ' </div>';
|
||||||
table += ' </div>';
|
table += ' </div>';
|
||||||
table += ' </div>';
|
table += ' </div>';
|
||||||
table += ' </td>';
|
table += ' </td>';
|
||||||
table += ' </tr>';
|
table += ' </tr>';
|
||||||
table += ' <tr>';
|
// table += ' <tr>';
|
||||||
table += ' <th></th>';
|
// table += ' <th>발급정보</th>';
|
||||||
table += ' <td>';
|
// table += ' <td>';
|
||||||
table += ' <div id="cshRciptIssu" style="display: none">';
|
// table += ' <div class="td-inner">';
|
||||||
table += ' <div>';
|
// table += ' <div class="custom-radio-container">';
|
||||||
table += ' <span class="visually-hidden">발급안함</span>';
|
// table += ' <div class="custom-radio is-medium">';
|
||||||
table += ' </div>';
|
// table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtN_' + id + '" value="" checked>';
|
||||||
table += ' <div class="td-inner vertical">';
|
// table += ' <label for="cshRciptIssuAtN_' + id + '">발급안함</label>';
|
||||||
table += ' <div class="custom-radio-container cashReceipt-borderTop">';
|
// table += ' </div>';
|
||||||
table += ' <div class="custom-radio is-medium">';
|
// table += ' <div class="custom-radio is-medium">';
|
||||||
table += ' <input type="radio" name="issuTrgetDvCd" id="issuTrgetDvCd0_' + id + '" value="01" checked>';
|
// table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtY_' + id + '" value="01" >';
|
||||||
table += ' <label for="issuTrgetDvCd0_' + id + '">개인 소득공제</label>';
|
// table += ' <label for="cshRciptIssuAtY_' + id + '">현금영수증</label>';
|
||||||
table += ' </div>';
|
// table += ' </div>';
|
||||||
table += ' <div class="custom-radio is-medium">';
|
// table += ' </div>';
|
||||||
table += ' <input type="radio" name="issuTrgetDvCd" id="issuTrgetDvCd1_' + id + '" value="02">';
|
// table += ' </div>';
|
||||||
table += ' <label for="issuTrgetDvCd1_' + id + '">사업자 지출증빙</label>';
|
// table += ' </td>';
|
||||||
table += ' </div>';
|
// table += ' </tr>';
|
||||||
table += ' </div>';
|
// table += ' <tr>';
|
||||||
table += ' <div class="w-full">';
|
// table += ' <th></th>';
|
||||||
table += ' <input type="text" name="issuTrgetMbtlnb" id="issuTrgetMbtlnb" oninput="fn_set_event(this, \'keyup\', fn_fmt_telno);" class="input-text md csh-rcipt-issu" maxlength="13" title="휴대폰번호" placeholder="휴대폰번호(\' - \'없이 입력)">';
|
// table += ' <td>';
|
||||||
table += ' <input type="text" name="issuTrgetBsnmNb" id="issuTrgetBsnmNb" class="number-only input-text md csh-rcipt-issu" maxlength="10" title="사업자번호" placeholder="사업자번호(\' - \'없이 입력)" style="display: none">';
|
// table += ' <div id="cshRciptIssu" style="display: none">';
|
||||||
table += ' </div>';
|
// table += ' <div>';
|
||||||
table += ' <p class="fyi gray-7 mt-10 ml-10">결제창에서 다시 현금영수증을 신청하지 마세요. 중복발행 됩니다.</p>';
|
// table += ' <span class="visually-hidden">발급안함</span>';
|
||||||
table += ' </div>';
|
// table += ' </div>';
|
||||||
table += ' </div>';
|
// table += ' <div class="td-inner vertical">';
|
||||||
table += ' </td>';
|
// table += ' <div class="custom-radio-container cashReceipt-borderTop">';
|
||||||
table += ' </tr>';
|
// table += ' <div class="custom-radio is-medium">';
|
||||||
|
// table += ' <input type="radio" name="issuTrgetDvCd" id="issuTrgetDvCd0_' + id + '" value="01" checked>';
|
||||||
|
// table += ' <label for="issuTrgetDvCd0_' + id + '">개인 소득공제</label>';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' <div class="custom-radio is-medium">';
|
||||||
|
// table += ' <input type="radio" name="issuTrgetDvCd" id="issuTrgetDvCd1_' + id + '" value="02">';
|
||||||
|
// table += ' <label for="issuTrgetDvCd1_' + id + '">사업자 지출증빙</label>';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' <div class="w-full">';
|
||||||
|
// table += ' <input type="text" name="issuTrgetMbtlnb" id="issuTrgetMbtlnb" oninput="fn_set_event(this, \'keyup\', fn_fmt_telno);" class="input-text md csh-rcipt-issu" maxlength="13" title="휴대폰번호" placeholder="휴대폰번호(\' - \'없이 입력)">';
|
||||||
|
// table += ' <input type="text" name="issuTrgetBsnmNb" id="issuTrgetBsnmNb" class="number-only input-text md csh-rcipt-issu" maxlength="10" title="사업자번호" placeholder="사업자번호(\' - \'없이 입력)" style="display: none">';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' <p class="fyi gray-7 mt-10 ml-10">결제창에서 다시 현금영수증을 신청하지 마세요. 중복발행 됩니다.</p>';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' </td>';
|
||||||
|
// table += ' </tr>';
|
||||||
table += ' </tbody>';
|
table += ' </tbody>';
|
||||||
table += '</table>';
|
table += '</table>';
|
||||||
|
|
||||||
@@ -3268,7 +3285,14 @@
|
|||||||
const setup = setupNbkDpstVOList[i];
|
const setup = setupNbkDpstVOList[i];
|
||||||
const title = setup.bankNm + ' ' + setup.acntnb + ' ' + setup.dpstrNm;
|
const title = setup.bankNm + ' ' + setup.acntnb + ' ' + setup.dpstrNm;
|
||||||
|
|
||||||
const option = '<option value="' + setup.acntnb + '" bnnk-nm="' + setup.bankNm + '" dpstr-nm="' + setup.dpstrNm + '">' + title + '</option>';
|
let option = '<option value="' + setup.acntnb + '" bnnk-nm="' + setup.bankNm + '" dpstr-nm="' + setup.dpstrNm + '">' + title + '</option>';
|
||||||
|
|
||||||
|
if(i === 0) {
|
||||||
|
// 첫번째만 selected 되게 설정
|
||||||
|
option = '<option value="' + setup.acntnb + '" bnnk-nm="' + setup.bankNm + '" dpstr-nm="' + setup.dpstrNm + '" selected>' + title + '</option>';
|
||||||
|
} else {
|
||||||
|
option = '<option value="' + setup.acntnb + '" bnnk-nm="' + setup.bankNm + '" dpstr-nm="' + setup.dpstrNm + '">' + title + '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
$(div).find('table tr #rcpmnyAcntnb').append(option);
|
$(div).find('table tr #rcpmnyAcntnb').append(option);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,10 @@
|
|||||||
const gcpayCardUseAt = $('#gcpayCardUseAt').val();
|
const gcpayCardUseAt = $('#gcpayCardUseAt').val();
|
||||||
let gcpayAt = ( gcpayCardUseAt === 'Y')? 'Y' : 'N';
|
let gcpayAt = ( gcpayCardUseAt === 'Y')? 'Y' : 'N';
|
||||||
const setleTy = $('#setleSetupTyCd').val();
|
const setleTy = $('#setleSetupTyCd').val();
|
||||||
const setleTyCd = (setleTy==='01')?'#pg04':'#pg03';
|
let setleTyCd = '#pg04';
|
||||||
|
if(setleTy==='01')setleTyCd = '#pg04'; //kcp
|
||||||
|
else if(setleTy==='02')setleTyCd = '#pg03'; //toss
|
||||||
|
else if(setleTy==='03')setleTyCd = '#pg06'; //kiwoom
|
||||||
|
|
||||||
if (gcpayAt === 'N') {
|
if (gcpayAt === 'N') {
|
||||||
$(setleTyCd).click();
|
$(setleTyCd).click();
|
||||||
@@ -528,11 +531,16 @@
|
|||||||
|
|
||||||
$(form).find('.pgContent').hide();
|
$(form).find('.pgContent').hide();
|
||||||
$(form).find('#' + id + 'Content').show();
|
$(form).find('#' + id + 'Content').show();
|
||||||
$(form).find('#setleSetupTyCd').val() === '01' ? $(form).find('#pg04Content').show() : $(form).find('#pg03Content').show();
|
|
||||||
|
//$(form).find('#setleSetupTyCd').val() === '01' ? $(form).find('#pg04Content').show() : $(form).find('#pg03Content').show();
|
||||||
|
if($(form).find('#setleSetupTyCd').val() === '01'){$(form).find('#pg04Content').show();}
|
||||||
|
else if($(form).find('#setleSetupTyCd').val() === '02'){$(form).find('#pg03Content').show();}
|
||||||
|
else if($(form).find('#setleSetupTyCd').val() === '03'){$(form).find('#pg06Content').show();}
|
||||||
|
|
||||||
$('.order-method-normal__btn').removeClass('active');
|
$('.order-method-normal__btn').removeClass('active');
|
||||||
$(form).find('#pgCmpnyNm').val(pgCmpnyNm);
|
$(form).find('#pgCmpnyNm').val(pgCmpnyNm);
|
||||||
|
|
||||||
if ('pg01' === id || 'pg02' === id) {
|
if ('pg01' === id || 'pg02' === id) { //GC페이
|
||||||
if ('pg02' === id) {
|
if ('pg02' === id) {
|
||||||
$('#gc-pay-bank-cash-receipt').prop('checked', true).trigger("click");
|
$('#gc-pay-bank-cash-receipt').prop('checked', true).trigger("click");
|
||||||
|
|
||||||
@@ -552,7 +560,7 @@
|
|||||||
$(form).find('#setleTyCd').val('pg01' === id ? '01' : '03');
|
$(form).find('#setleTyCd').val('pg01' === id ? '01' : '03');
|
||||||
|
|
||||||
$('.bankSlideW, .cardSlideW').slick('setPosition');
|
$('.bankSlideW, .cardSlideW').slick('setPosition');
|
||||||
} else if('pg05' === id){
|
} else if('pg05' === id){ //퀵계좌이체
|
||||||
$('#transfer-cash-receipt').prop('checked', true).trigger("click");
|
$('#transfer-cash-receipt').prop('checked', true).trigger("click");
|
||||||
|
|
||||||
$(form).find('#transfer-cash-receipt').on('click', function () {
|
$(form).find('#transfer-cash-receipt').on('click', function () {
|
||||||
@@ -582,7 +590,10 @@
|
|||||||
const content = $('.order-method-normal__content');
|
const content = $('.order-method-normal__content');
|
||||||
const useCashMlgAmt = $('#useCashMlgAmt').val();
|
const useCashMlgAmt = $('#useCashMlgAmt').val();
|
||||||
|
|
||||||
$('#setleSetupTyCd').val() === '01' ? $('#pg04').click() : $('#pg03').click();
|
//$('#setleSetupTyCd').val() === '01' ? $('#pg04').click() : $('#pg03').click();
|
||||||
|
if($('#setleSetupTyCd').val() === '01'){$('#pg04').click();}
|
||||||
|
else if($('#setleSetupTyCd').val() === '02'){$('#pg03').click();}
|
||||||
|
else if($('#setleSetupTyCd').val() === '03'){$('#pg06').click();}
|
||||||
|
|
||||||
$('.order-method-normal__btn').removeClass('active');
|
$('.order-method-normal__btn').removeClass('active');
|
||||||
$(this).addClass('active');
|
$(this).addClass('active');
|
||||||
@@ -2065,7 +2076,7 @@
|
|||||||
tr += ' </td>';
|
tr += ' </td>';
|
||||||
tr += ' <td>';
|
tr += ' <td>';
|
||||||
tr += ' <span class="cartItem__beforePrice"><span class="comma product-subCnsmrpric">' + (goods.cnsmrpric).toLocaleString() + '</span>' + curUnit + '</span>';
|
tr += ' <span class="cartItem__beforePrice"><span class="comma product-subCnsmrpric">' + (goods.cnsmrpric).toLocaleString() + '</span>' + curUnit + '</span>';
|
||||||
tr += ' <span class="cartItem__afterPrice"><span class="comma product-dscntApplyAmt">' + (goods.selpric).toLocaleString() + '</span><span class="priceUnit">' + curUnit + '</span></span>';
|
tr += ' <span class="cartItem__afterPrice"><span class="comma product-dscntApplyAmt">' + (goods.slepric).toLocaleString() + '</span><span class="priceUnit">' + curUnit + '</span></span>';
|
||||||
tr += ' </td>';
|
tr += ' </td>';
|
||||||
tr += '</tr>';
|
tr += '</tr>';
|
||||||
|
|
||||||
@@ -2968,7 +2979,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('kcp' === pgCmpnyNm || 'toss' === pgCmpnyNm) {
|
if ('kcp' === pgCmpnyNm || 'toss' === pgCmpnyNm || 'kiwoom' === pgCmpnyNm) {
|
||||||
const div = $('#setleForm').find('.order-method-normal');
|
const div = $('#setleForm').find('.order-method-normal');
|
||||||
|
|
||||||
if (!$(div).find('.order-method-normal__btn-container button').hasClass('active')) {
|
if (!$(div).find('.order-method-normal__btn-container button').hasClass('active')) {
|
||||||
@@ -3009,7 +3020,12 @@
|
|||||||
const id = '01' === issuTrgetDvCd ? 'issuTrgetMbtlnb' : 'issuTrgetBsnmNb';
|
const id = '01' === issuTrgetDvCd ? 'issuTrgetMbtlnb' : 'issuTrgetBsnmNb';
|
||||||
let rlPgCmpnyNm = $('#pgCmpnyNm').val();
|
let rlPgCmpnyNm = $('#pgCmpnyNm').val();
|
||||||
|
|
||||||
let setleTyId = $('kcp' === pgCmpnyNm ? '#pg04Content' : '#pg03Content').find('button[name="' + setleTyCd + '"]').attr('id');
|
let pgCont = "";
|
||||||
|
if('kiwoom' === pgCmpnyNm) pgCont='pg06Content';
|
||||||
|
else if('kcp' === pgCmpnyNm) pgCont='pg04Content';
|
||||||
|
else pgCont='pg03Content';
|
||||||
|
let setleTyId = $('#'+pgCont).find('button[name="' + setleTyCd + '"]').attr('id');
|
||||||
|
|
||||||
|
|
||||||
if ('tosspay' === rlPgCmpnyNm) {
|
if ('tosspay' === rlPgCmpnyNm) {
|
||||||
setleTyId = 'acount'
|
setleTyId = 'acount'
|
||||||
@@ -3058,7 +3074,7 @@
|
|||||||
|
|
||||||
$('#setleForm').find('#pgCmpnyNm').val(pgCmpnyNm);
|
$('#setleForm').find('#pgCmpnyNm').val(pgCmpnyNm);
|
||||||
$('#setleForm').find('#setleTyCd').val(setleTyCd);
|
$('#setleForm').find('#setleTyCd').val(setleTyCd);
|
||||||
} else {
|
} else { //gc페이
|
||||||
if ('01' === setleTyCd) { // 카드
|
if ('01' === setleTyCd) { // 카드
|
||||||
const index = $('.cardSlideW').slick('slickCurrentSlide');
|
const index = $('.cardSlideW').slick('slickCurrentSlide');
|
||||||
const curCardId = $('#gcCardId' + index).val();
|
const curCardId = $('#gcCardId' + index).val();
|
||||||
@@ -3186,7 +3202,7 @@
|
|||||||
// const enuriObj = JSON.parse(enuri);
|
// const enuriObj = JSON.parse(enuri);
|
||||||
// const setleAmtFromEnuri = enuriObj['setleAmt']; // 계산된 결제금액
|
// const setleAmtFromEnuri = enuriObj['setleAmt']; // 계산된 결제금액
|
||||||
const setleAmtFromSubsvc = order.goodsList.reduce(function(sum, item){
|
const setleAmtFromSubsvc = order.goodsList.reduce(function(sum, item){
|
||||||
return sum + Number(item.selpric || 0); // 계산된 결제금액
|
return sum + Number(item.slepric || 0); // 계산된 결제금액
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
if (setleAmtFromOrder !== setleAmtFromSubsvc.toString()) {
|
if (setleAmtFromOrder !== setleAmtFromSubsvc.toString()) {
|
||||||
@@ -3367,38 +3383,6 @@
|
|||||||
fn_get_setle_amt();
|
fn_get_setle_amt();
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
/****************************************************************/
|
|
||||||
/* m_Completepayment 설명 */
|
|
||||||
/****************************************************************/
|
|
||||||
/* 인증완료시 재귀 함수 */
|
|
||||||
/* 해당 함수명은 절대 변경하면 안됩니다. */
|
|
||||||
/* 해당 함수의 위치는 kcp_spay_hub.js 보다먼저 선언되어여 합니다. */
|
|
||||||
/* Web 방식의 경우 리턴 값이 form 으로 넘어옴 */
|
|
||||||
/****************************************************************/
|
|
||||||
function m_Completepayment(FormOrJson, closeEvent) {
|
|
||||||
var frm = document.order_info;
|
|
||||||
|
|
||||||
/********************************************************************/
|
|
||||||
/* FormOrJson은 가맹점 임의 활용 금지 */
|
|
||||||
/* frm 값에 FormOrJson 값이 설정 된 frm 값으로 활용 하셔야 됩니다. */
|
|
||||||
/********************************************************************/
|
|
||||||
GetField(frm, FormOrJson);
|
|
||||||
|
|
||||||
if (frm.res_cd.value == "0000"){
|
|
||||||
/* 결제인증 완료 후 결제승인 요청을 위한 비즈니스 로직 구현 */
|
|
||||||
frm.submit();
|
|
||||||
} else {
|
|
||||||
/* 결제인증 실패에 대한 처리 */
|
|
||||||
alert( "[" + frm.res_cd.value + "] " + frm.res_msg.value );
|
|
||||||
|
|
||||||
location.reload();
|
|
||||||
|
|
||||||
closeEvent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 약관 상세 보기, 마케팅동의여부 모달 데이터 정제*/
|
/* 약관 상세 보기, 마케팅동의여부 모달 데이터 정제*/
|
||||||
const fn_select_clause = (stplatDvCd,agreeAt) => {
|
const fn_select_clause = (stplatDvCd,agreeAt) => {
|
||||||
@@ -3461,6 +3445,38 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/****************************************************************/
|
||||||
|
/* m_Completepayment 설명 */
|
||||||
|
/****************************************************************/
|
||||||
|
/* 인증완료시 재귀 함수 */
|
||||||
|
/* 해당 함수명은 절대 변경하면 안됩니다. */
|
||||||
|
/* 해당 함수의 위치는 kcp_spay_hub.js 보다먼저 선언되어여 합니다. */
|
||||||
|
/* Web 방식의 경우 리턴 값이 form 으로 넘어옴 */
|
||||||
|
/****************************************************************/
|
||||||
|
function m_Completepayment(FormOrJson, closeEvent) {
|
||||||
|
var frm = document.order_info;
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
/* FormOrJson은 가맹점 임의 활용 금지 */
|
||||||
|
/* frm 값에 FormOrJson 값이 설정 된 frm 값으로 활용 하셔야 됩니다. */
|
||||||
|
/********************************************************************/
|
||||||
|
GetField(frm, FormOrJson);
|
||||||
|
|
||||||
|
if (frm.res_cd.value == "0000"){
|
||||||
|
/* 결제인증 완료 후 결제승인 요청을 위한 비즈니스 로직 구현 */
|
||||||
|
frm.submit();
|
||||||
|
} else {
|
||||||
|
/* 결제인증 실패에 대한 처리 */
|
||||||
|
alert( "[" + frm.res_cd.value + "] " + frm.res_msg.value );
|
||||||
|
|
||||||
|
location.reload();
|
||||||
|
|
||||||
|
closeEvent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${data.payInfo.kcpMid eq 'T0007'}">
|
<c:when test="${data.payInfo.kcpMid eq 'T0007'}">
|
||||||
<script type="text/javascript" src="https://testspay.kcp.co.kr/plugin/kcp_spay_hub.js"></script>
|
<script type="text/javascript" src="https://testspay.kcp.co.kr/plugin/kcp_spay_hub.js"></script>
|
||||||
@@ -3504,6 +3520,15 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function kiwoom_Completepayment() {
|
||||||
|
var frm = document.order_info;
|
||||||
|
const encoded = btoa(unescape(encodeURIComponent(frm.ordrrNm.value)));
|
||||||
|
frm.ordrrNm.value = encoded;
|
||||||
|
frm.submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<%-- 공통 Header --%>
|
<%-- 공통 Header --%>
|
||||||
@@ -4417,6 +4442,138 @@
|
|||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
<%-- kcp 결제 종료 --%>
|
<%-- kcp 결제 종료 --%>
|
||||||
|
|
||||||
|
<%-- 키움 결제 시작 --%>
|
||||||
|
<c:if test="${'03' eq payInfo.setleSetupTyCd}">
|
||||||
|
<div class="custom-radio is-medium">
|
||||||
|
<input type="radio" name="pg" id="pg06" value="kiwoom">
|
||||||
|
<label for="pg06">일반결제</label>
|
||||||
|
</div>
|
||||||
|
<div id="pg06Content" class="pgContent order-method-normal" <%-- style="display: none"--%>>
|
||||||
|
<div class="order-method-normal__btn-container">
|
||||||
|
<c:if test="${'Y' eq payInfo.cardUseAt}">
|
||||||
|
<button type="button" name="01" id="card" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--card"></div>신용카드
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<%--
|
||||||
|
<c:if test="${'Y' eq payInfo.rltmAcntUseAt}">
|
||||||
|
<button type="button" name="03" id="acount" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--transfer"></div>실시간 계좌이체
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
--%>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntUseAt}">
|
||||||
|
<button type="button" name="04" id="virtual" class="order-method-normal__btn">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--account"></div>가상계좌
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntEscwUseAt}">
|
||||||
|
<button type="button" name="05" id="escrow-virtual" class="order-method-normal__btn not_multi_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--account"></div>가상계좌(에스크로)
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.nbkkUseAt}">
|
||||||
|
<button type="button" name="02" id="bank" class="order-method-normal__btn">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--deposit"></div>무통장
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.paycoUseAt}">
|
||||||
|
<button type="button" name="10" id="payco" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--payco"></div>PAYCO
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.tpayUseAt}">
|
||||||
|
<button type="button" name="tosspay" id="tosspay" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--toss"></div>토스페이
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.npayUseAt}">
|
||||||
|
<button type="button" name="naverpay" id="naverpay" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--naver"></div>네이버페이
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.kpayUseAt}">
|
||||||
|
<button type="button" name="kakaopay" id="kakaopay" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--kakao"></div>카카오페이
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
<div class="order-method-normal__content-wrapper">
|
||||||
|
<c:if test="${'Y' eq payInfo.cardUseAt}">
|
||||||
|
<div id="card-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="card-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<p class="fyi gray-7 mt-10 ml-10 noempty">발급정보 : 카드매출전표(또는 휴대폰결제전표)로 대체합니다.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<%--
|
||||||
|
<c:if test="${'Y' eq payInfo.rltmAcntUseAt}">
|
||||||
|
<div id="acount-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="acount-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
--%>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntUseAt}">
|
||||||
|
<div id="virtual-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="virtual-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntEscwUseAt}">
|
||||||
|
<div id="escrow-virtual-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="escrow-virtual-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.nbkkUseAt}">
|
||||||
|
<div id="bank-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="bank-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.paycoUseAt}">
|
||||||
|
<div id="payco-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="payco-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<div class="infoBox noempty">
|
||||||
|
<h6 class="infoBox__title">PAYCO 간편결제 안내</h6>
|
||||||
|
<ol class="infoBox__list">
|
||||||
|
<li>PAYCO는 온/오프라인 쇼핑은 물론 송금, 멤버십 적립까지 가능한 통합 서비스입니다.</li>
|
||||||
|
<li>휴대폰과 카드 명의자가 동일해야 결제 가능하며, 결제금액 제한은 없습니다.
|
||||||
|
<br>- 지원카드: 모든 국내 신용/체크카드
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<p class="textInfo noempty"><i class="icon icon_textInfo--sm"></i>발급정보 : 카드매출전표(또는 휴대폰결제전표)로 대체합니다.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.tpayUseAt}">
|
||||||
|
<div id="acount-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="acount-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<p class="fyi gray-7 mt-10 ml-10 noempty">발급정보 : 카드매출전표(또는 휴대폰결제전표)로 대체합니다.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.npayUseAt}">
|
||||||
|
<div id="naverpay-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="naverpay-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<div class="noempty">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.kpayUseAt}">
|
||||||
|
<div id="kakaopay-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="kakaopay-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<div class="noempty">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<%-- 키움 결제 종료 --%>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -191,6 +191,14 @@
|
|||||||
, 'success_reg_alert'
|
, 'success_reg_alert'
|
||||||
, '#regSuccessBtn'
|
, '#regSuccessBtn'
|
||||||
, fn_goM2mqna, '1');
|
, fn_goM2mqna, '1');
|
||||||
|
}else if($("#reqDv").val() === 'nlist') {//일반문의
|
||||||
|
openConfirmModal(function (onSuccess) {
|
||||||
|
fn_regist_bbsctt(onSuccess);//등록함수
|
||||||
|
}, 'confirm_reg_alert'
|
||||||
|
, '#regCfrmBtn'
|
||||||
|
, 'success_reg_alert'
|
||||||
|
, '#regSuccessBtn'
|
||||||
|
, fn_goNormalQna, '1');
|
||||||
}else {
|
}else {
|
||||||
console.log("등록처리");
|
console.log("등록처리");
|
||||||
openConfirmModal(function (onSuccess) {
|
openConfirmModal(function (onSuccess) {
|
||||||
@@ -208,6 +216,11 @@
|
|||||||
window.location.href = "/sopmal/mpage/act/selectM2mQnaInqire?bbsId=mbrqna";
|
window.location.href = "/sopmal/mpage/act/selectM2mQnaInqire?bbsId=mbrqna";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (typeof fn_goNormalQna === 'undefined') {
|
||||||
|
function fn_goNormalQna(curPage) {
|
||||||
|
window.location.href = "/sopmal/mpage/act/selectNormalQnaInqire?bbsId=normal_qna";
|
||||||
|
}
|
||||||
|
}
|
||||||
/*********************************************************
|
/*********************************************************
|
||||||
* 게시글 등록
|
* 게시글 등록
|
||||||
*********************************************************/
|
*********************************************************/
|
||||||
|
|||||||
@@ -46,12 +46,12 @@
|
|||||||
$('#dlvyCnt').text(data.dlvyCnt);
|
$('#dlvyCnt').text(data.dlvyCnt);
|
||||||
$('#dlvyCycle').text(data.dlvyCycle);
|
$('#dlvyCycle').text(data.dlvyCycle);
|
||||||
$('#cnsmrpric').text(fn_format_number(data.cnsmrpric) + curUnit);
|
$('#cnsmrpric').text(fn_format_number(data.cnsmrpric) + curUnit);
|
||||||
$('#selpric').text(fn_format_number(data.selpric) + curUnit);
|
$('#slepric').text(fn_format_number(data.slepric) + curUnit);
|
||||||
$('#dscntRaito').text(data.dscntRaito + '%');
|
$('#dscntRaito').text(data.dscntRaito + '%');
|
||||||
$('#subsvcDc').html(
|
$('#subsvcDc').html(
|
||||||
data.mblSubsvcDcPcSameAt === "N" ? data.mblSubsvcDc : data.subsvcDc
|
data.mblSubsvcDcPcSameAt === "N" ? data.mblSubsvcDc : data.subsvcDc
|
||||||
);
|
);
|
||||||
fn_hide_subsvcDetail(data.subPd, data.dlvyCnt, data.selpric);
|
fn_hide_subsvcDetail(data.subPd, data.dlvyCnt, data.slepric);
|
||||||
|
|
||||||
switch (data.subsvcSttusCd) {
|
switch (data.subsvcSttusCd) {
|
||||||
case '01':
|
case '01':
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
/******************************************************
|
/******************************************************
|
||||||
* 구독서비스 상세 숨기기
|
* 구독서비스 상세 숨기기
|
||||||
* ****************************************************/
|
* ****************************************************/
|
||||||
const fn_hide_subsvcDetail = function(subPd, dlvyCnt, selpric) {
|
const fn_hide_subsvcDetail = function(subPd, dlvyCnt, slepric) {
|
||||||
function isEmpty(val) {
|
function isEmpty(val) {
|
||||||
return !val || val === 0;
|
return !val || val === 0;
|
||||||
}
|
}
|
||||||
@@ -88,8 +88,8 @@
|
|||||||
hideIf(isEmpty(subPd), 'dl', '#subPd');
|
hideIf(isEmpty(subPd), 'dl', '#subPd');
|
||||||
hideIf(isEmpty(dlvyCnt), 'dl', '#dlvyCnt');
|
hideIf(isEmpty(dlvyCnt), 'dl', '#dlvyCnt');
|
||||||
hideIf(isEmpty(subPd) && isEmpty(dlvyCnt), '.productDetailInfo__info');
|
hideIf(isEmpty(subPd) && isEmpty(dlvyCnt), '.productDetailInfo__info');
|
||||||
hideIf(isEmpty(selpric), '.productDetailInfo__price');
|
hideIf(isEmpty(slepric), '.productDetailInfo__price');
|
||||||
hideIf(isEmpty(selpric), '#subscribeBtn');
|
hideIf(isEmpty(slepric), '#subscribeBtn');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
@@ -97,20 +97,22 @@
|
|||||||
**************************************************************/
|
**************************************************************/
|
||||||
const fn_purchs_subsvc = function() {
|
const fn_purchs_subsvc = function() {
|
||||||
var checkedValue = $("input[name='subsvcInnb']:checked").val();
|
var checkedValue = $("input[name='subsvcInnb']:checked").val();
|
||||||
|
location.href = "/sopmal/ordr/selectSubsvcPurchsForm" +
|
||||||
|
"?subsvcInnb=" + encodeURIComponent(checkedValue);
|
||||||
|
|
||||||
var tempForm = $('<form>', {
|
// var tempForm = $('<form>', {
|
||||||
method: 'post',
|
// method: 'post',
|
||||||
action: '/sopmal/ordr/selectSubsvcPurchsForm'
|
// action: '/sopmal/ordr/selectSubsvcPurchsForm'
|
||||||
});
|
// });
|
||||||
$('<input>', {
|
// $('<input>', {
|
||||||
type: 'hidden',
|
// type: 'hidden',
|
||||||
name: 'subsvcInnb',
|
// name: 'subsvcInnb',
|
||||||
value: checkedValue
|
// value: checkedValue
|
||||||
}).appendTo(tempForm);
|
// }).appendTo(tempForm);
|
||||||
|
//
|
||||||
tempForm.appendTo('body');
|
// tempForm.appendTo('body');
|
||||||
tempForm.submit();
|
// tempForm.submit();
|
||||||
tempForm.remove();
|
// tempForm.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************
|
/******************************************************
|
||||||
@@ -166,7 +168,7 @@
|
|||||||
<div class="productDetailInfo__price">
|
<div class="productDetailInfo__price">
|
||||||
<div class="productDetailInfo__price__price">
|
<div class="productDetailInfo__price__price">
|
||||||
<span id="cnsmrpric" class="productDetailInfo__price__original"></span>
|
<span id="cnsmrpric" class="productDetailInfo__price__original"></span>
|
||||||
<span id="selpric" class="productDetailInfo__price__current"></span>
|
<span id="slepric" class="productDetailInfo__price__current"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="productDetailInfo__price__sale">
|
<div class="productDetailInfo__price__sale">
|
||||||
<span id="dscntRaito" class="percent" style="color: red">%</span>
|
<span id="dscntRaito" class="percent" style="color: red">%</span>
|
||||||
|
|||||||
378
src/main/webapp/WEB-INF/views/sopmal_m/mpage/act/MyNormalQaR.jsp
Normal file
378
src/main/webapp/WEB-INF/views/sopmal_m/mpage/act/MyNormalQaR.jsp
Normal file
@@ -0,0 +1,378 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||||
|
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||||
|
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
||||||
|
<%--
|
||||||
|
Class Name : MyNormalQaR.jsp
|
||||||
|
Description :마이페이지 일반문의 모바일
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2026-04-06 김현욱 최초 생성
|
||||||
|
--%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mobile/Include.jsp"/>
|
||||||
|
</head>
|
||||||
|
<spring:eval expression="@environment.getProperty('sopmalfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function (){
|
||||||
|
/*헤더에 타이틀 set*/
|
||||||
|
fn_set_header_title("일반 문의");
|
||||||
|
/*마이크로모달 초기화 id 매핑*/
|
||||||
|
MicroModal.init(
|
||||||
|
{
|
||||||
|
disableScroll: true,
|
||||||
|
awaitCloseAnimation: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
/*인피니트 스크롤 함수 호출*/
|
||||||
|
fn_infinite_scroll(fn_add_list,'','footer');
|
||||||
|
//아코디언 클릭 시 폼 제출 방지
|
||||||
|
$(".myQnaList__item").click(function (event) {
|
||||||
|
$target = $(this);
|
||||||
|
$details = $(this).closest('details');
|
||||||
|
if(!$details.attr("open")){ //open상태임
|
||||||
|
const bbscttInnb = $target.attr("bbsctt-innb");
|
||||||
|
const idx = $target.index(".myQnaList__item");
|
||||||
|
fn_select_fileInfo(bbscttInnb, idx);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//등록 버튼
|
||||||
|
$(document).on('click','#registBtn',function(){
|
||||||
|
const bbscttInnb = $(this).closest('div').find("[name='bbscttInnb']").val();
|
||||||
|
fn_pop_regist(bbscttInnb);
|
||||||
|
});
|
||||||
|
//수정 폼 이동 버튼
|
||||||
|
$(document).on('click', '.updateBtn', function () {
|
||||||
|
const bbscttInnb = $(this).closest('div').find("[name='bbscttInnb']").val();
|
||||||
|
const bbsId = $("#bbsId").val();
|
||||||
|
fn_move_qaUpdt(bbscttInnb, bbsId);
|
||||||
|
});
|
||||||
|
//삭제 모달 버튼
|
||||||
|
$(document).on('click', '.deleteBtn', function () {
|
||||||
|
const bbscttInnb = $(this).closest('div').find("[name='bbscttInnb']").val();
|
||||||
|
openModal("confirm_del_alert");
|
||||||
|
$('#delCfrmBtn').attr('bbsctt-innb', bbscttInnb);
|
||||||
|
});
|
||||||
|
//삭제 버튼
|
||||||
|
$(document).on('click', '#delCfrmBtn', function () {
|
||||||
|
const bbscttInnb = $(this).attr("bbsctt-innb");
|
||||||
|
const bbsId = $("#bbsId").val();
|
||||||
|
const bbsTyCd = $("#bbsTyCd").val();
|
||||||
|
fn_delete_bbsctt(bbscttInnb, bbsId, bbsTyCd);
|
||||||
|
});
|
||||||
|
//삭제 성공 모달 확인 버튼
|
||||||
|
$(document).on('click','#delSuccessBtn', function(){
|
||||||
|
closeModal("success_del_alert");
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const fn_pop_regist = (bbscttInnb) => {
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
data: {
|
||||||
|
authDv: "REGIST",
|
||||||
|
reqUrl: "modal",
|
||||||
|
bbsId: "normal_qna",
|
||||||
|
bbscttInnb: bbscttInnb,
|
||||||
|
reqDv: "nlist"
|
||||||
|
},
|
||||||
|
url: "/sopmal/csc/selectBbscttAuth",
|
||||||
|
success: function (data) {
|
||||||
|
// $("#modalDiv").html(data);
|
||||||
|
// MicroModal.init();
|
||||||
|
// closeModal("authPop");
|
||||||
|
// openModal2("authPop");
|
||||||
|
$('#authPop').remove();
|
||||||
|
$("#modalDiv").html(data);
|
||||||
|
openModal2('authPop');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//게시글 수정
|
||||||
|
const fn_move_qaUpdt = (bbscttInnb, bbsId) => {
|
||||||
|
const form = $('<form>', {
|
||||||
|
'action': '/sopmal/mpage/act/selectNormalQnaDtlUpdtForm',
|
||||||
|
'method': 'get'
|
||||||
|
}).append(
|
||||||
|
$('<input>', {
|
||||||
|
'type': 'hidden',
|
||||||
|
'name': 'bbscttInnb',
|
||||||
|
'value': bbscttInnb
|
||||||
|
})
|
||||||
|
).append(
|
||||||
|
$('<input>', {
|
||||||
|
'type': 'hidden',
|
||||||
|
'name': 'bbsId',
|
||||||
|
'value': bbsId
|
||||||
|
})
|
||||||
|
)
|
||||||
|
$('body').append(form);
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
//게시글 삭제
|
||||||
|
const fn_delete_bbsctt =(bbscttInnb,bbsId,bbsTyCd)=>{
|
||||||
|
closeModal("confirm_del_alert");
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "/sopmal/csc/deleteBbscttDel",
|
||||||
|
data: {
|
||||||
|
"delBbscttInnbArr": bbscttInnb,
|
||||||
|
"bbsId": bbsId,
|
||||||
|
"bbsTyCd": bbsTyCd
|
||||||
|
},
|
||||||
|
success: function () {
|
||||||
|
openModal("success_del_alert");
|
||||||
|
$("#delCfrmBtn").removeAttr("bbscttInnb");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//해당 게시물 파일정보 get
|
||||||
|
const fn_select_fileInfo = (bbscttInnb, idx) => {
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "/sopmal/mpage/act/selectFileInfo",
|
||||||
|
data: {"bbscttInnb": bbscttInnb},
|
||||||
|
success: function (data) {
|
||||||
|
const resultData = JSON.parse(data.resBody.result);
|
||||||
|
const fileInfo = resultData.fileInfo;
|
||||||
|
let img = '';
|
||||||
|
const cdnurl = '<c:out value="${cdnurl}"/>';
|
||||||
|
fileInfo.forEach(function (file) {
|
||||||
|
img += `<img src="\${cdnurl}\${file.filCours}\/\${file.sysFilNm}\" onerror="this.src='/mobile/images/image_placeholder.png'" alt="\${file.orginlFilNm}\"/>`;
|
||||||
|
});
|
||||||
|
$(".myQnaList__item").eq(idx).find(".file").html(img);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//인피니티 스크롤 이벤트 콜백 함수
|
||||||
|
const fn_add_list = () => {
|
||||||
|
if($("#evtOccrrncAt").val() === 'continue'){
|
||||||
|
/*다음 페이지로 이동*/
|
||||||
|
let pageIndex = parseInt($("#pageIndex").val(), 10);
|
||||||
|
$("#pageIndex").val(pageIndex+1);
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
data: {
|
||||||
|
bbsId: $("#bbsId").val(),
|
||||||
|
pageIndex: $("#pageIndex").val()
|
||||||
|
},
|
||||||
|
url: "/sopmal/mpage/act/selectNormalQnaInqireAjax",
|
||||||
|
success: function (data) {
|
||||||
|
fn_append_List(data);//DATA append 함수
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// data append 함수
|
||||||
|
const fn_append_List = (data) => {
|
||||||
|
data = JSON.parse(data.resBody.result);
|
||||||
|
let resultData = data.resultList.resultList;
|
||||||
|
|
||||||
|
let list = ``;
|
||||||
|
if(resultData.length > 0){
|
||||||
|
$("#evtOccrrncAt").val("continue");
|
||||||
|
|
||||||
|
resultData.forEach(function (item) {
|
||||||
|
Object.keys(item).forEach(function (key) {
|
||||||
|
if (item[key] === null) {
|
||||||
|
item[key] = "";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 리스트를 지정된 요소에 추가
|
||||||
|
resultData.forEach(function(item) {
|
||||||
|
//분류
|
||||||
|
let answCn = ``;
|
||||||
|
if (item.answCn !== null) {
|
||||||
|
answCn = `[\${item.answCn}]`
|
||||||
|
}
|
||||||
|
|
||||||
|
//답변여부
|
||||||
|
let answSttus = ``;
|
||||||
|
let answBbscttCn = ``;
|
||||||
|
let updtAt= `` ;
|
||||||
|
if (item.answBbscttInnb !== null) {
|
||||||
|
answSttus = `<span class="text-complete">답변완료</span>`;
|
||||||
|
answBbscttCn = `<div class="ck-content">\${item.answBbscttCn}</div>`;
|
||||||
|
updtAt = ``;
|
||||||
|
} else {
|
||||||
|
answSttus = `<span class="text-waiting">답변대기</span>`;
|
||||||
|
answBbscttCn = `답변 등록 중 입니다.`;
|
||||||
|
updtAt = `<button type="button" class="textBtns__btn updateBtn"><spring:message code="button.update"/></button>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
list += `<details class="myQnaList__item" bbsctt-innb = "\${item.bbscttInnb}">
|
||||||
|
<summary class="myQnaList__top">
|
||||||
|
<div class="myQnaList__right">
|
||||||
|
<div class="myQnaList__info">
|
||||||
|
<p class="myQnaList__info__name">\${item.goodsNm}</p>
|
||||||
|
<p class="myQnaList__info__question">
|
||||||
|
<span class="category">\${answCn}</span>
|
||||||
|
\${item.sj}
|
||||||
|
</p>
|
||||||
|
<p class="myQnaList__info__status">
|
||||||
|
<span>
|
||||||
|
\${answSttus}
|
||||||
|
</span>
|
||||||
|
<span class="myQnaList__info__date">\${item.sumRegistDt}</span>
|
||||||
|
</p>
|
||||||
|
<span class="myQnaList__top__chevron"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</summary>
|
||||||
|
<div class="myQnaList__answer">
|
||||||
|
<p class="myQnaList__answer__question">
|
||||||
|
\${item.cn}
|
||||||
|
</p>
|
||||||
|
<br>
|
||||||
|
<div class="file"></div>
|
||||||
|
<br>
|
||||||
|
<div class="myQnaList__answer__reply">
|
||||||
|
<p class="myQnaList__answer__reply__text">
|
||||||
|
<span class="myQnaList__answer__badge">답변</span>
|
||||||
|
\${answBbscttCn}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="textBtns">
|
||||||
|
<input type = "hidden" name = "bbscttInnb" value = "\${item.bbscttInnb}">
|
||||||
|
<button type="button" class="textBtns__btn deleteBtn"><spring:message code="button.delete"/></button>
|
||||||
|
\${updtAt}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</details>`;
|
||||||
|
});
|
||||||
|
$(".myQnaList__item").last().after(list);
|
||||||
|
} else {
|
||||||
|
/*데이터 조회 null일시 그 전 페이지 인덱스로 변경*/
|
||||||
|
$("#evtOccrrncAt").val("stop");
|
||||||
|
let pageIndex = parseInt($("#pageIndex").val(), 10);
|
||||||
|
$("#pageIndex").val(pageIndex - 1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<body>
|
||||||
|
<div class="screen-wrap">
|
||||||
|
<!-- 헤더 영역 -->
|
||||||
|
<header class="header header--sub">
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mobile/Header.jsp"/>
|
||||||
|
</header>
|
||||||
|
<!-- 하단 탭바 -->
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mobile/TabBar.jsp"/>
|
||||||
|
<!-- 메인 컨텐츠 -->
|
||||||
|
<div class="content-wrap">
|
||||||
|
<main class="main">
|
||||||
|
<div class="sub-page">
|
||||||
|
<div class="myQnaList">
|
||||||
|
<div class="sub-box">
|
||||||
|
<c:set value="${resultMap.bbsInfo}" var = "bbsInfo"/>
|
||||||
|
<input type = "hidden" value = "<c:out value="${bbsInfo.bbsId}"/>" id = "bbsId">
|
||||||
|
<input type = "hidden" value = "<c:out value="${bbsInfo.bbsTyCd}"/>" id = "bbsTyCd">
|
||||||
|
<input type = "hidden" name="slangFlterUseAt" id = "slangFlterUseAt" value = "<c:out value="${bbsInfo.slangFlterUseAt}"/>">
|
||||||
|
<input type = "hidden" value = "<c:out value="${resultMap.bbsctt.pageIndex}"/>" name = "pageIndx" id = "pageIndex">
|
||||||
|
<input type="hidden" id="evtOccrrncAt" value="continue"/><%--인피니티스크롤 이벤트 발생 여부--%>
|
||||||
|
<div style="display: flex; align-items: center; justify-content: flex-end; padding: 8px 14px;">
|
||||||
|
<button class="btn theme" id = "registBtn">글쓰기</button>
|
||||||
|
</div>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test = "${ not empty resultMap.resultList.resultList }">
|
||||||
|
<c:forEach var="resultList" items="${ resultMap.resultList.resultList}">
|
||||||
|
<details class="myQnaList__item" bbsctt-innb = "<c:out value = '${resultList.bbscttInnb}'/>">
|
||||||
|
<summary class="myQnaList__top">
|
||||||
|
<div class="myQnaList__right">
|
||||||
|
<div class="myQnaList__info">
|
||||||
|
<p class="myQnaList__info__name"><c:out value="${resultList.goodsNm}"/></p>
|
||||||
|
<p class="myQnaList__info__question">
|
||||||
|
<span class="category"><c:if test = "${not empty resultList.answCn}">[<c:out value="${resultList.answCn}"/>]</c:if></span>
|
||||||
|
<c:out value="${resultList.sj}"/>
|
||||||
|
</p>
|
||||||
|
<p class="myQnaList__info__status">
|
||||||
|
<span>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test = "${not empty resultList.answBbscttInnb}">
|
||||||
|
<span class="text-complete">답변완료</span>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<span class="text-waiting">답변대기</span>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</span>
|
||||||
|
<span class="myQnaList__info__date"><c:out value="${resultList.sumRegistDt}"/></span>
|
||||||
|
</p>
|
||||||
|
<span class="myQnaList__top__chevron"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</summary>
|
||||||
|
<div class="myQnaList__answer">
|
||||||
|
<p class="myQnaList__answer__question">
|
||||||
|
<c:out value="${resultList.cn}"/>
|
||||||
|
</p>
|
||||||
|
<br>
|
||||||
|
<div class="file"></div>
|
||||||
|
<br>
|
||||||
|
<div class="myQnaList__answer__reply">
|
||||||
|
<p class="myQnaList__answer__reply__text">
|
||||||
|
<span class="myQnaList__answer__badge">답변</span>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test = "${not empty resultList.answBbscttInnb}">
|
||||||
|
<div class = "ck-content"><c:out value="${resultList.answBbscttCn}" escapeXml="false"/></div>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
답변 등록 중 입니다.
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="textBtns">
|
||||||
|
<input type = "hidden" name = "bbscttInnb" value = "<c:out value="${resultList.bbscttInnb}"/>">
|
||||||
|
<button type="button" class="textBtns__btn deleteBtn"><spring:message code="button.delete"/></button>
|
||||||
|
<c:if test="${empty resultList.answBbscttInnb}">
|
||||||
|
<button type="button" class="textBtns__btn updateBtn"><spring:message code="button.update"/>
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
</c:forEach>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<div class="noResult">
|
||||||
|
<div class="noResult__image">
|
||||||
|
<img src="/mobile/images/icon__no-result.png" alt="상품 이미지">
|
||||||
|
</div>
|
||||||
|
<p class="noResult__text">등록된 상품 문의가 없습니다.</p>
|
||||||
|
</div>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Top 버튼 -->
|
||||||
|
<div class="quick-menu__to-top">
|
||||||
|
<button><i class="icon icon_quick-to-top"></i>
|
||||||
|
<span class="visually-hidden">위로 가기</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- 푸터 -->
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mobile/Footer.jsp"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="modalDiv"></div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,990 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||||
|
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||||
|
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld" %>
|
||||||
|
<%--
|
||||||
|
Class Name : BbscttUpdtU.jsp
|
||||||
|
Description :게시글 수정(모바일).jsp
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2024-07-24 김혜인 최초 생성
|
||||||
|
--%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mobile/Include.jsp"/>
|
||||||
|
</head>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function () {
|
||||||
|
//hidden value set
|
||||||
|
fn_update_hidden_value();
|
||||||
|
/*헤더에 타이틀 set*/
|
||||||
|
const title = '<c:out value="${resultMap.bbsInfo.bbsNm}" escapeXml="false"/>';
|
||||||
|
fn_set_header_title(title);
|
||||||
|
|
||||||
|
fn_collect_event();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
/*************************************************************
|
||||||
|
이벤트 함수
|
||||||
|
*************************************************************/
|
||||||
|
const fn_collect_event = () => {
|
||||||
|
//내용 set
|
||||||
|
fn_select_cn();
|
||||||
|
|
||||||
|
MicroModal.init(
|
||||||
|
{
|
||||||
|
disableScroll: true,
|
||||||
|
awaitCloseAnimation: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
/*휴대전화 포매팅 함수*/
|
||||||
|
fn_set_event("#answMbtlnb","input",fn_fmt_telno);
|
||||||
|
/*값 set*/
|
||||||
|
if($("#answMbtlnb").val()){
|
||||||
|
const fmtMbtlnb = fn_format_mbtlnb($("#answMbtlnb").val());
|
||||||
|
$("#answMbtlnb").val(fmtMbtlnb);
|
||||||
|
}
|
||||||
|
|
||||||
|
//내용 텍스트 <br>태그 엔터값으로 replace
|
||||||
|
const cn = $("#cnBbsUpdt");
|
||||||
|
let str = cn.text();
|
||||||
|
str = str.replaceAll(/<br>/ig, '\n');
|
||||||
|
str = str.replaceAll(/<\/br>/ig, '\n');
|
||||||
|
str = str.replaceAll(/<br \/>/ig, '\n');
|
||||||
|
//내용 내 태그 없애기
|
||||||
|
str = str.replace(/<\/?[^>]+(>|$)/g, "");
|
||||||
|
//내용 앞에 첫 문자열 앞 공백 지우기
|
||||||
|
str = str.trimStart();
|
||||||
|
cn.text(str);
|
||||||
|
|
||||||
|
//분류 change시 hidden value값 set
|
||||||
|
$('#qesitmNmC').on('change', function () {
|
||||||
|
$("#qesitmInnb").val("");
|
||||||
|
$("#qesitmNm").val("");
|
||||||
|
$("#answCn").val("");
|
||||||
|
const option = $('option:selected', this);
|
||||||
|
const qesitmInnb = $(option).attr('qesitm-innb');
|
||||||
|
const answCn = $(option).attr('answ-Cn');
|
||||||
|
const qesitmNm = $(option).attr('qesitm-nm');
|
||||||
|
if ($(this).val() !== "") {
|
||||||
|
$("#qesitmInnb").val(qesitmInnb);
|
||||||
|
$("#answCn").val(answCn);
|
||||||
|
$("#qesitmNm").val(qesitmNm);
|
||||||
|
$("#qesitmAt").val("Y");
|
||||||
|
} else {
|
||||||
|
$("#qesitmInnb").val("");
|
||||||
|
$("#answCn").val("");
|
||||||
|
$("#qesitmNm").val("");
|
||||||
|
$("#qesitmAt").val("N");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//추가입력 항목 라디오 'click' 이벤트
|
||||||
|
$('.answRadioC').on('click', function () {
|
||||||
|
const radio = $(this);
|
||||||
|
//추가입력 항목 내용 요소 get
|
||||||
|
const answ = radio.closest("div").find('[name="answCnArr[]"]');
|
||||||
|
//추가입력 항목 내용 요소 get
|
||||||
|
const qesitmInnb = radio.closest("div").find('[name="qesitmInnbArr[]"]');
|
||||||
|
//라디오 클릭으로 인한 제어 요소 get
|
||||||
|
const contrlTarget = radio.closest("div").find('.answRadio');
|
||||||
|
//항목 고유번호 내용 요소 get
|
||||||
|
const itmInnb = radio.closest("div").find('[name="itmInnbArr[]"]');
|
||||||
|
//라디오 클릭 시 disabled 비활성
|
||||||
|
if (radio.is(":checked")) {
|
||||||
|
//답변 내용 초기화
|
||||||
|
answ.val("");
|
||||||
|
const radioVal = $(radio).attr('itm-cn');
|
||||||
|
answ.val(radioVal);
|
||||||
|
//항목 내용 set
|
||||||
|
qesitmInnb.val("");
|
||||||
|
const qesitmInnbVal = $(radio).attr('qesitm-innb');
|
||||||
|
qesitmInnb.val(qesitmInnbVal);
|
||||||
|
//항목고유번호 내용 set
|
||||||
|
itmInnb.val("");
|
||||||
|
const itmInnbVal = $(radio).val();
|
||||||
|
itmInnb.val(itmInnbVal);
|
||||||
|
//라디오 주위 input값 disable false처리
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", false);
|
||||||
|
radio.closest("div").find(".answRadioAt").val("Y");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", true);
|
||||||
|
radio.closest("div").find(".answRadioAt").val("N");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//추가입력 항목 셀렉트 'change'이벤트
|
||||||
|
$(document).on('change', '.answSelectC', function () {
|
||||||
|
const select = $(this);
|
||||||
|
const answ = select.closest("div").find('[name="answCnArr[]"]');
|
||||||
|
const qesitmInnb = select.closest("div").find('[name="qesitmInnbArr[]"]');
|
||||||
|
const contrlTarget = select.closest("div").find('.answSelect');
|
||||||
|
const option = $('option:selected', this);
|
||||||
|
if (select.val() != "") {
|
||||||
|
//답변 내용 초기화
|
||||||
|
answ.val("");
|
||||||
|
const selectVal = $(option).attr('itm-cn');
|
||||||
|
answ.val(selectVal);
|
||||||
|
//항목 내용 set
|
||||||
|
qesitmInnb.val("");
|
||||||
|
const qesitmInnbVal = $(option).attr('qesitm-innb');
|
||||||
|
qesitmInnb.val(qesitmInnbVal);
|
||||||
|
//셀렉트 주위 input값 disable false처리
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", false);
|
||||||
|
select.closest("div").find(".answSelectAt").val("Y");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", true);
|
||||||
|
select.closest("div").find(".answSelectAt").val("N");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//추가입력 항목 체크박스 'click'이벤트
|
||||||
|
$(document).on('click', '.answChkC', function () {
|
||||||
|
const check = $(this);
|
||||||
|
const contrlTarget = check.closest("div").find('.answChk');
|
||||||
|
var isChecked = $(this).is(":checked");
|
||||||
|
//클릭한 체크박스 주위 input값 disable false처리
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
if (isChecked) {
|
||||||
|
$(this).prop("disabled", false);
|
||||||
|
} else {
|
||||||
|
$(this).prop("disabled", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 체크된 체크박스가 하나라도 있는지 확인
|
||||||
|
let anyChecked = $('.answChkC:checked').length > 0;
|
||||||
|
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
if (anyChecked) {
|
||||||
|
check.closest("td").find(".answChkAt").val("Y");
|
||||||
|
} else {
|
||||||
|
check.closest("td").find(".answChkAt").val("N");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
//추가입력 항목 텍스트 'input'이벤트
|
||||||
|
$(document).on('input', '.answTxtC', function () {
|
||||||
|
const txt = $(this);
|
||||||
|
const contrlTarget = txt.closest("div").find('.answTxt');
|
||||||
|
const contrlAt = txt.closest("div").find('.answTxtAt');
|
||||||
|
//클릭한 체크박스 주위 input값 disable false처리
|
||||||
|
if (txt.val() != "") {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", false);
|
||||||
|
contrlAt.val("Y");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", true);
|
||||||
|
contrlAt.val("N");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//파일 업로드
|
||||||
|
$(document).on("change", "#fileUpload", function () {
|
||||||
|
addFiles(event, 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
//수정 버튼 이벤트 (수정 컨펌 모달 호출)
|
||||||
|
$(document).on("click", "#updtBtn", function () {
|
||||||
|
$("#confirmBtn").click();
|
||||||
|
});
|
||||||
|
|
||||||
|
//수정 컨펌 이벤트(수정 함수 호출)
|
||||||
|
$("#confirmPopBtn").on("click",function(){
|
||||||
|
$("#clsConfirmPopBtn").click();//모달닫기
|
||||||
|
fn_update_bbsctt();//수정 함수 호출
|
||||||
|
});
|
||||||
|
|
||||||
|
//수정 완료 모달 > 확인 버튼 이벤트 (새로고침)
|
||||||
|
$(document).on("click", "#alertBtn", function () {
|
||||||
|
$('html').scrollTop(0);
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
|
||||||
|
/*sms알림요청 체크 시에만 휴대전화 입력폼 활성화*/
|
||||||
|
$("#answSmsRecptn").on('click', function() {
|
||||||
|
const target = $(this).closest(".userForm__inputBox__item").find("#answMbtlnb");
|
||||||
|
if(this.checked) {
|
||||||
|
target.prop("disabled", false);
|
||||||
|
} else {
|
||||||
|
target.prop("disabled", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
/*********************************************************
|
||||||
|
* 게시글 내용 조회
|
||||||
|
*********************************************************/
|
||||||
|
const fn_select_cn = function () {
|
||||||
|
let bbscttInnb = $("#bbscttInnb").val();
|
||||||
|
let bbsId = $("#bbsId").val();
|
||||||
|
let sopmalCd = $("#sopmalCd").val();
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "<c:url value ='/sopmal/csc/selectBbscttCn'/>",
|
||||||
|
contentType: 'application/json',
|
||||||
|
data: JSON.stringify({
|
||||||
|
bbsId: bbsId,
|
||||||
|
bbscttInnb: bbscttInnb,
|
||||||
|
sopmalCd: sopmalCd
|
||||||
|
}),
|
||||||
|
success: function (data) {
|
||||||
|
let cn = JSON.parse(data.resBody.result).cn;
|
||||||
|
$("#cnBbsUpdt").val(cn);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//input 생성 함수
|
||||||
|
const fn_create_input = (name, value, tgtForm) => {
|
||||||
|
const input = document.createElement('input');
|
||||||
|
input.setAttribute("type", "hidden");
|
||||||
|
input.setAttribute("name", name);
|
||||||
|
input.setAttribute("value", value);
|
||||||
|
tgtForm.appendChild(input);
|
||||||
|
}
|
||||||
|
/*********************************************************
|
||||||
|
* 게시글 수정
|
||||||
|
*********************************************************/
|
||||||
|
const fn_update_bbsctt = function () {
|
||||||
|
let url = '<c:url value="/sopmal/csc/updateBbscttupdt"/>';
|
||||||
|
let saveForm = $('#bbsUpdtForm');
|
||||||
|
let formData = new FormData();
|
||||||
|
|
||||||
|
//파일 업로드
|
||||||
|
if ($("#image-dropzone").length > 0) {
|
||||||
|
let myDropzone = Dropzone.forElement("#image-dropzone");
|
||||||
|
myDropzone.files.forEach(function (file) {
|
||||||
|
formData.append("files", file);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//사용자 등록 시 노출 여부 Y
|
||||||
|
formData.append("expsrAt", "Y");
|
||||||
|
|
||||||
|
//비밀번호 set
|
||||||
|
const password = "<c:out value = "${ resultMap.bbscttInfo.bbscttInfo.password }"/>";
|
||||||
|
if (password.length){
|
||||||
|
formData.append("password", password);
|
||||||
|
}
|
||||||
|
//입력항목 체크박스 disabled처리
|
||||||
|
$('.checkbox input[type="checkbox"]').each(function () {
|
||||||
|
if (!$(this).prop('checked')) {
|
||||||
|
fn_ctrl_disable([".checkbox"],);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let cn = $("#cnBbsUpdt").val();
|
||||||
|
cn = $.trim(cn);
|
||||||
|
$("#cnBbsUpdt").val(cn);
|
||||||
|
//폼 내 input값 append
|
||||||
|
saveForm.serializeArray().forEach(function (item) {
|
||||||
|
formData.append(item.name, item.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: url,
|
||||||
|
enctype:"multipart/form-data",
|
||||||
|
data: formData,
|
||||||
|
processData: false,
|
||||||
|
contentType: false,
|
||||||
|
success: function (result) {
|
||||||
|
$("#successBtn").click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
fn_ctrl_disable("", [".checkbox"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function fn_update_hidden_value() {
|
||||||
|
//분류 항목
|
||||||
|
const option = $('option:selected', $("#qesitmNmC"));
|
||||||
|
const qesitmInnb = $(option).attr('qesitm-innb');
|
||||||
|
const answCn = $(option).attr('answ-Cn');
|
||||||
|
const qesitmNm = $(option).attr('qesitm-nm');
|
||||||
|
if ($("#qesitmNmC").val() != "") {
|
||||||
|
$("#qesitmInnb").val(qesitmInnb);
|
||||||
|
$("#answCn").val(answCn);
|
||||||
|
$("#qesitmAt").val("Y");
|
||||||
|
} else {
|
||||||
|
$("#qesitmInnb").val("");
|
||||||
|
$("#answCn").val("");
|
||||||
|
$("#qesitmAt").val("N");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 추가평가항목 라디오
|
||||||
|
const radio = $(".answRadioC:checked");
|
||||||
|
|
||||||
|
radio.each(function (idx) {
|
||||||
|
if (radio.eq(idx).val()) {
|
||||||
|
let radioAnsw = radio.eq(idx).closest("reviewRadio__item").find('[name="answCnArr[]"]');
|
||||||
|
let radioQesitmInnb = radio.eq(idx).closest("reviewRadio__item").find('[name="qesitmInnbArr[]"]');
|
||||||
|
let radioItmInnb = radio.eq(idx).closest("reviewRadio__item").find('[name="itmInnbArr[]"]');
|
||||||
|
let radioQesitmAt = radio.eq(idx).closest("reviewRadio__item").find('[name="qesitmAtArr[]"]');
|
||||||
|
let radioContrlTarget = radio.eq(idx).closest("reviewRadio__item").find('.answRadio');
|
||||||
|
|
||||||
|
// 답변 내용 set
|
||||||
|
radioAnsw.val(radio.eq(idx).attr('itm-cn'));
|
||||||
|
// 항목 내용 set
|
||||||
|
radioQesitmInnb.val(radio.eq(idx).attr('qesitm-innb'));
|
||||||
|
// 항목고유번호 내용 set
|
||||||
|
radioItmInnb.val(radio.eq(idx).val());
|
||||||
|
// 답변 여부
|
||||||
|
radioQesitmAt.val("Y");
|
||||||
|
|
||||||
|
// 라디오 주위 input값 disable false처리
|
||||||
|
radioContrlTarget.each(function (idx) {
|
||||||
|
radioContrlTarget.eq(idx).prop("disabled", false);
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
let radioAnsw = radio.eq(idx).closest("reviewRadio__item").find('[name="answCnArr[]"]');
|
||||||
|
let radioQesitmInnb = radio.eq(idx).closest("reviewRadio__item").find('[name="qesitmInnbArr[]"]');
|
||||||
|
let radioItmInnb = radio.eq(idx).closest("reviewRadio__item").find('[name="itmInnbArr[]"]');
|
||||||
|
let radioQesitmAt = radio.eq(idx).closest("reviewRadio__item").find('[name="qesitmAtArr[]"]');
|
||||||
|
let radioContrlTarget = radio.eq(idx).closest("div").find('.answRadio');
|
||||||
|
// 답변 내용 set
|
||||||
|
radioAnsw.val("");
|
||||||
|
// 항목 내용 set
|
||||||
|
radioQesitmInnb.val("");
|
||||||
|
// 항목고유번호 내용 set
|
||||||
|
radioItmInnb.val("");
|
||||||
|
// 답변 여부
|
||||||
|
radioQesitmAt.val("N");
|
||||||
|
// 라디오 주위 input값 disable false처리
|
||||||
|
radioContrlTarget.each(function (idx) {
|
||||||
|
radioContrlTarget.eq(idx).prop("disabled", true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//추가입력 항목 셀렉트 'change'이벤트
|
||||||
|
const select = $('select.answSelectC[name="itmInnbArr[]"]');
|
||||||
|
select.each(function (idx) {
|
||||||
|
let selectIndex = select.eq(idx).find('option:selected').index();
|
||||||
|
if (selectIndex > 0) {
|
||||||
|
let selectQesitmAt = select.eq(idx).closest("reviewRadio__item").find('[name="qesitmAtArr[]"]');
|
||||||
|
let selectQesitmInnb = select.eq(idx).closest("reviewRadio__item").find('[name="qesitmInnbArr[]"]');
|
||||||
|
let selectAnsw = select.eq(idx).closest("reviewRadio__item").find('[name="answCnArr[]"]');
|
||||||
|
let selectOption = $('option:selected', select.eq(idx));
|
||||||
|
let selectContrlTarget = select.eq(idx).closest("reviewRadio__item").find('.answSelect');
|
||||||
|
// 답변 여부
|
||||||
|
selectQesitmAt.val("Y");
|
||||||
|
// 항목 내용 set
|
||||||
|
selectQesitmInnb.val(selectOption.attr('qesitm-innb'));
|
||||||
|
// 답변 내용 set
|
||||||
|
selectAnsw.val(selectOption.attr('itm-cn'));
|
||||||
|
// 라디오 주위 input값 disable false처리
|
||||||
|
selectContrlTarget.each(function (idx) {
|
||||||
|
selectContrlTarget.eq(idx).prop("disabled", false);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let selectQesitmAt = select.eq(idx).closest("reviewRadio__item").find('[name="qesitmAtArr[]"]');
|
||||||
|
let selectQesitmInnb = select.eq(idx).closest("reviewRadio__item").find('[name="qesitmInnbArr[]"]');
|
||||||
|
let selectAnsw = select.eq(idx).closest("reviewRadio__item").find('[name="answCnArr[]"]');
|
||||||
|
let selectContrlTarget = select.eq(idx).closest("reviewRadio__item").find('.answSelect');
|
||||||
|
// 답변 여부
|
||||||
|
selectQesitmAt.val("N");
|
||||||
|
// 항목 내용 set
|
||||||
|
selectQesitmInnb.val("");
|
||||||
|
// 답변 내용 set
|
||||||
|
selectAnsw.val("");
|
||||||
|
// 라디오 주위 input값 disable false처리
|
||||||
|
selectContrlTarget.each(function (idx) {
|
||||||
|
selectContrlTarget.eq(idx).prop("disabled", true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const check = $(".answChkC");
|
||||||
|
//클릭한 체크박스 주위 input값 disable false처리
|
||||||
|
check.each(function (idx) {
|
||||||
|
let checkContrlTarget = check.eq(idx).closest(".checkbox").find('.answChk');
|
||||||
|
let isChecked = check.eq(idx).is(":checked");
|
||||||
|
|
||||||
|
checkContrlTarget.each(function (index) {
|
||||||
|
if (isChecked) {
|
||||||
|
checkContrlTarget.eq(index).prop("disabled", false);
|
||||||
|
} else {
|
||||||
|
checkContrlTarget.eq(index).prop("disabled", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 체크된 체크박스가 하나라도 있는지 확인
|
||||||
|
let anyChecked = check.eq(idx).closest("reviewRadio__inputRow").find(".answChkC:checked").length > 0;
|
||||||
|
if (anyChecked) {
|
||||||
|
check.eq(idx).closest("reviewRadio__inputRow").find(".answChkAt").val("Y");
|
||||||
|
} else {
|
||||||
|
check.eq(idx).closest("reviewRadio__inputRow").find(".answChkAt").val("N");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//추가입력 항목 텍스트 'input'이벤트
|
||||||
|
const txt = $('.answTxtC');
|
||||||
|
txt.each(function (idx) {
|
||||||
|
let contrlTarget = txt.eq(idx).closest("div").find('.answTxt');
|
||||||
|
let contrlAt = txt.eq(idx).closest("div").find('.answTxtAt');
|
||||||
|
//클릭한 체크박스 주위 input값 disable false처리
|
||||||
|
if (txt.val() != "") {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", false);
|
||||||
|
contrlAt.val("Y");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
contrlTarget.each(function () {
|
||||||
|
contrlTarget.prop("disabled", true);
|
||||||
|
contrlAt.val("N");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/*상품qna 버튼 클릭 제어*/
|
||||||
|
function fn_prevent_click(event) {
|
||||||
|
event.preventDefault(); // 체크박스 상태 변경 방지
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<body>
|
||||||
|
<c:set value="${resultMap.bbscttInfo.bbscttInfo}" var="bbscttInfo"/>
|
||||||
|
<c:set value="${resultMap.bbscttVO}" var="bbscttVO"/>
|
||||||
|
<c:set value="${resultMap.bbscttInfo.qesitmAnswList}" var="qesitmAnswList"/>
|
||||||
|
<c:set value="${resultMap.bbscttInfo.fileInfo}" var="fileInfo"/>
|
||||||
|
<c:set value="${resultMap.bbscttInfo.fileInfoGson}" var="fileInfoGson"/>
|
||||||
|
<c:set value="${resultMap.bbscttInfo.goods}" var="goods"/>
|
||||||
|
<c:set value="${resultMap.bbscttInfo.wrter}" var="wrter"/>
|
||||||
|
<c:set value="${resultMap.bbsInfo}" var="bbsInfo"/>
|
||||||
|
<c:set value="${resultMap.qesitmList.qesitmList}" var="qesitmList"/>
|
||||||
|
<c:set value="${resultMap.qesitmList.itmCnList}" var="itmCnList"/>
|
||||||
|
<c:set value="${resultMap.itmList}" var="itmList"/>
|
||||||
|
<spring:eval expression="@environment.getProperty('sopmalfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||||
|
<!-- 메인 컨텐츠 영역 -->
|
||||||
|
<div class="screen-wrap">
|
||||||
|
<!-- 헤더 영역 -->
|
||||||
|
<header class="header header--sub">
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mobile/Header.jsp"/>
|
||||||
|
</header>
|
||||||
|
<!-- 하단 탭바 -->
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mobile/TabBar.jsp"/>
|
||||||
|
<!-- 메인 컨텐츠 -->
|
||||||
|
<div class="content-wrap">
|
||||||
|
<main class="main">
|
||||||
|
<div class="sub-page">
|
||||||
|
<div class="myQnaEdit">
|
||||||
|
<div class="sub-box">
|
||||||
|
<form id="bbsUpdtForm">
|
||||||
|
<%--게시판 설정--%>
|
||||||
|
<input type="hidden" name="filAtch" value="${bbsInfo.filAtch }"/>
|
||||||
|
<input type="hidden" name="slangFlterUseAt" value="${bbsInfo.slangFlterUseAt}"/>
|
||||||
|
<input type="hidden" id = "bbsId" name="bbsId" value="${bbsInfo.bbsId }"/>
|
||||||
|
<input type="hidden" id = "bbsTyCd" name="bbsTyCd" value="${bbsInfo.bbsTyCd }"/>
|
||||||
|
<input type="hidden" id="pgeVtcCnt" name="pgeVtcCnt" value="${ bbsInfo.pgeVtcCnt }"/>
|
||||||
|
<input type="hidden" id="pgeWthCnt" name="pgeWthCnt" value="${ bbsInfo.pgeWthCnt }"/>
|
||||||
|
<input type="hidden" id="prevNext" name="prevNext" value="${ bbsInfo.prevNext }"/>
|
||||||
|
<input type="hidden" id="sknTyCd" name="sknTyCd" value="${ bbsInfo.sknTyCd }"/>
|
||||||
|
<input type="hidden" id="sopmalCd" name="sopmalCd" value="${ bbsInfo.sopmalCd }"/>
|
||||||
|
<%--vo 관련(요청 구분 등)--%>
|
||||||
|
<input type="hidden" id="reqDv" value="<c:out value = '${bbscttVO.reqDv}'/>" name="reqDv"/>
|
||||||
|
<input type="hidden" id="reqUrl" value="<c:out value = '${bbscttVO.reqUrl}'/>" name="reqUrl"/>
|
||||||
|
<input type="hidden" id="listAt" name="listAt" value="${ bbscttVO.listAt }"/>
|
||||||
|
<%--게시글 관련--%>
|
||||||
|
<input type="hidden" id="bbscttInnb" name="bbscttInnb" value="${ bbscttInfo.bbscttInnb }"/>
|
||||||
|
<%--파일 관련--%>
|
||||||
|
<spring:eval expression="@environment.getProperty('sopmalfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||||
|
<input type="hidden" id="acceptFileExtensions" name="acceptFileExtensions" value="${ acceptFileExtensions}"/>
|
||||||
|
<%--존재 파일 여부 체크--%>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test = "${not empty fileInfo}"><c:set var="filExtAt" value="Y"/></c:when>
|
||||||
|
<c:otherwise><c:set var="filExtAt" value="N"/></c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
<input type="hidden" id="filExtAt" name="filExtAt" value="${filExtAt}"/>
|
||||||
|
<input type="hidden" id="extFiles" name="extFiles" value=""/>
|
||||||
|
<input type="hidden" id="filesInfo" name="filesInfo"/>
|
||||||
|
<input type="hidden" id="extFilChangeAt" name="extFilChangeAt" value="N"/>
|
||||||
|
<%--입력 폼 영역--%>
|
||||||
|
<div class="userForm">
|
||||||
|
<div class="userForm__inputBox">
|
||||||
|
<div class="userForm__inputBox__item">
|
||||||
|
<div class="userForm__inputBox__itemTitle">이름
|
||||||
|
<span class="required-asterisk">*</span>
|
||||||
|
</div>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test = "${bbscttInfo.regusrDvCd eq '99'}">
|
||||||
|
<input type="text" class="input-text full" name="regusrNm"
|
||||||
|
placeholder="이름" title="이름" value = "<c:out value="${bbscttInfo.regusrNm}"/>">
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<input type="text" class="input-text full" name="regusrNm"
|
||||||
|
placeholder="이름" title="이름" value = "<c:out value="${bbscttInfo.regusrNm}"/>" readonly>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</div>
|
||||||
|
<c:if test="${bbsInfo.answRegist eq 'Y' && bbsInfo.bbscttSndngMthCd ne '03'}"><%--답변사용여부와 게시글 문자사용여부 체크--%>
|
||||||
|
<div class="userForm__inputBox__item">
|
||||||
|
<div class="userForm__inputBox__itemTitle">답변받기</div>
|
||||||
|
<div class="b-checkbox-container">
|
||||||
|
<label class="b-checkbox is-medium checkbox">
|
||||||
|
<input class="termCheck" type="checkbox" name="answSmsRecptn"
|
||||||
|
value="Y" id="answSmsRecptn"
|
||||||
|
<c:if test="${bbscttInfo.answSmsRecptn eq 'Y'}">checked</c:if>>
|
||||||
|
<span class="check"></span>
|
||||||
|
<span class="control-label">SMS 알림요청</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<div class="userForm__inputBox__item">
|
||||||
|
<div class="userForm__inputBox__itemTitle">상품</div>
|
||||||
|
<c:forEach var="goods" items="${goods}">
|
||||||
|
<div class="userForm__inputBox__itemTitle">
|
||||||
|
<img src="${cdnurl}${goods.img}" width="64" alt="상품이미지" onerror="this.src='/pc/images/image_placeholder.png'">
|
||||||
|
<c:out value="${goods.goodsNm}"/>
|
||||||
|
<input type="hidden" name="goodsInnbArr[]" value="${goods.goodsInnb}"/>
|
||||||
|
</div>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
<c:if test="${not empty itmList}">
|
||||||
|
<div class="userForm__inputBox__item">
|
||||||
|
<div class="userForm__inputBox__itemTitle">문의 유형<span
|
||||||
|
class="required-asterisk">*</span></div>
|
||||||
|
<div class="select-box">
|
||||||
|
<%--문항답변필수여부 --%>
|
||||||
|
<input type="hidden" name="qesitmEssntlAtArr[]" value="Y">
|
||||||
|
<%--문항명 --%>
|
||||||
|
<input type="hidden" name="qesitmNmArr[]" id="qesitmNm" value="분류"/>
|
||||||
|
<%--문항고유번호 --%>
|
||||||
|
<input type="hidden" name="qesitmInnbArr[]" id="qesitmInnb"
|
||||||
|
<c:forEach var="itmAnswList" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${itmAnswList.aditItmDvCd eq '03'}">
|
||||||
|
value = <c:out value="${itmAnswList.qesitmInnb}"/>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>/>
|
||||||
|
<%--답변내용 --%>
|
||||||
|
<input type="hidden" name="answCnArr[]" id="answCn"<c:forEach
|
||||||
|
var="itmAnswList" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${itmAnswList.aditItmDvCd eq '03'}">
|
||||||
|
value = <c:out value="${itmAnswList.answCn}"/>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>/>
|
||||||
|
<%--답변여부 --%>
|
||||||
|
<input type="hidden" name="qesitmAtArr[]" id="qesitmAt"
|
||||||
|
<c:forEach var="itmAnswList" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${itmAnswList.aditItmDvCd eq '03'}">
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${empty itmAnswList.answCn}">value="N"</c:when>
|
||||||
|
<c:otherwise>value="Y"</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>>
|
||||||
|
<select class="md" id="qesitmNmC" name="itmInnbArr[]">
|
||||||
|
<option value="">분류 선택</option>
|
||||||
|
<c:forEach var="itm" items="${itmList}" varStatus="status">
|
||||||
|
<option value="<c:out value="${itm.itmInnb}"/>"
|
||||||
|
qesitm-innb="${itm.qesitmInnb}" answ-Cn="${itm.itmCn}"
|
||||||
|
qesitm-nm="${itm.qesitmNm}"
|
||||||
|
<%--분류 답변 값 유지--%>
|
||||||
|
<c:forEach var="itmAnswList" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${itmAnswList.aditItmDvCd eq '03'}">
|
||||||
|
<c:if test="${itm.itmInnb eq itmAnswList.itmInnb }">selected</c:if>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>>
|
||||||
|
<c:out value="${itm.itmCn}"/>
|
||||||
|
</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${not empty qesitmList}">
|
||||||
|
<div class="reviewRadio">
|
||||||
|
<c:forEach var="qesitmList" items="${qesitmList}">
|
||||||
|
<c:if test="${ qesitmList.itmTyCd eq '01'}">
|
||||||
|
<%--라디오 유형--%>
|
||||||
|
<div class="reviewRadio__item">
|
||||||
|
<div class="reviewRadio__title">
|
||||||
|
<c:out value="${ qesitmList.qesitmNm }"/>
|
||||||
|
<c:if test="${qesitmList.qesitmEssntlAt eq 'Y'}">
|
||||||
|
<span class="required-asterisk">*</span>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
<div class="custom-radio-container">
|
||||||
|
<input type="hidden" name="qesitmEssntlAtArr[]"
|
||||||
|
value="${ qesitmList.qesitmEssntlAt}"
|
||||||
|
class="essntlChk">
|
||||||
|
<input type="hidden" name="qesitmNmArr[]"
|
||||||
|
value="${ qesitmList.qesitmNm}">
|
||||||
|
<input type="hidden" name="qesitmAtArr[]"
|
||||||
|
class="answRadioAt qesitmAtChk" value="N">
|
||||||
|
<input type="hidden" name="qesitmInnbArr[]"
|
||||||
|
class="answRadio"
|
||||||
|
value="${ qesitmList.qesitmInnb }" disabled>
|
||||||
|
<input type="hidden" name="answCnArr[]" class="answRadio"
|
||||||
|
disabled>
|
||||||
|
<input type="hidden" name="itmInnbArr[]" class="answRadio"
|
||||||
|
disabled>
|
||||||
|
<c:forEach items="${itmCnList}" var="itmCnList1" varStatus="status">
|
||||||
|
<c:if test="${itmCnList1.qesitmInnb eq qesitmList.qesitmInnb}">
|
||||||
|
<div class="custom-radio is-medium">
|
||||||
|
<input type="radio" id="answCn${ status.index }"
|
||||||
|
class="answRadioC"
|
||||||
|
qesitm-innb='${itmCnList1.qesitmInnb}'
|
||||||
|
name="itmInnbArr${ qesitmList.qesitmInnb}[]"
|
||||||
|
value="${ itmCnList1.itmInnb}"
|
||||||
|
itm-cn="${ itmCnList1.itmCn }"
|
||||||
|
<c:forEach var="qesitmAnswList1"
|
||||||
|
items="${qesitmAnswList}">
|
||||||
|
<c:if test="${qesitmAnswList1.itmTyCd eq '01'}">
|
||||||
|
<c:if test="${qesitmAnswList1.itmInnb eq itmCnList1.itmInnb}">checked</c:if>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>>
|
||||||
|
<label for="answCn${ status.index }">${ itmCnList1.itmCn }</label>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${ qesitmList.itmTyCd eq '02'}">
|
||||||
|
<%--셀렉트 유형--%>
|
||||||
|
<div class="reviewRadio__item">
|
||||||
|
<div class="reviewRadio__title">
|
||||||
|
<c:out value="${ qesitmList.qesitmNm }"/>
|
||||||
|
<c:if test="${qesitmList.qesitmEssntlAt eq 'Y'}">
|
||||||
|
<span class="required-asterisk">*</span>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="qesitmEssntlAtArr[]"
|
||||||
|
value="${ qesitmList.qesitmEssntlAt }" class="essntlChk">
|
||||||
|
<input type="hidden" name="qesitmNmArr[]"
|
||||||
|
value="${ qesitmList.qesitmNm }">
|
||||||
|
<input type="hidden" name="qesitmAtArr[]"
|
||||||
|
class="answSelectAt qesitmAtChk" value="N">
|
||||||
|
<input type="hidden" name="qesitmInnbArr[]" class="answSelect"
|
||||||
|
value="${ qesitmList.qesitmInnb }" disabled>
|
||||||
|
<input type="hidden" name="answCnArr[]" class="answSelect" disabled>
|
||||||
|
<div class="select-box">
|
||||||
|
<select class="md answSelectC" name="itmInnbArr[]">
|
||||||
|
<option value="">전체</option>
|
||||||
|
<c:forEach items="${itmCnList}" var="itmCnList2">
|
||||||
|
<c:if test="${itmCnList2.qesitmInnb eq qesitmList.qesitmInnb}">
|
||||||
|
<c:set var="selected" value=""/>
|
||||||
|
<c:forEach var="qesitmAnswList2" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${qesitmAnswList2.itmInnb eq itmCnList2.itmInnb}">
|
||||||
|
<c:set var="selected" value="selected"/>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
<option value="${itmCnList2.itmInnb}"
|
||||||
|
itm-cn="${itmCnList2.itmCn}"
|
||||||
|
qesitm-innb="${itmCnList2.qesitmInnb}" ${selected}>
|
||||||
|
${itmCnList2.itmCn}
|
||||||
|
</option>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${ qesitmList.itmTyCd eq '03'}">
|
||||||
|
<%--체크박스 유형--%>
|
||||||
|
<div class="reviewRadio__item">
|
||||||
|
<div class="reviewRadio__title">
|
||||||
|
<c:out value="${ qesitmList.qesitmNm }"/>
|
||||||
|
<c:if test="${qesitmList.qesitmEssntlAt eq 'Y'}">
|
||||||
|
<span class="required-asterisk">*</span>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="qesitmEssntlAtArr[]"
|
||||||
|
value="${ qesitmList.qesitmEssntlAt }" class="essntlChk">
|
||||||
|
<input type="hidden" name="qesitmNmArr[]"
|
||||||
|
value="${ qesitmList.qesitmNm }">
|
||||||
|
<input type="hidden" name="qesitmAtArr[]"
|
||||||
|
class="answChkAt qesitmAtChk"
|
||||||
|
value="N">
|
||||||
|
<div class="b-checkbox-container">
|
||||||
|
<c:forEach items="${itmCnList}" var="itmCnList3">
|
||||||
|
<c:if test="${itmCnList3.qesitmInnb eq qesitmList.qesitmInnb}">
|
||||||
|
<label class="b-checkbox checkbox">
|
||||||
|
<input type="hidden" class="answChk"
|
||||||
|
name="qesitmInnbArr[]"
|
||||||
|
value="${ qesitmList.qesitmInnb }" disabled>
|
||||||
|
<input type="hidden" class="answChk"
|
||||||
|
name="answCnArr[]"
|
||||||
|
value="${ itmCnList3.itmCn }" disabled>
|
||||||
|
<input type="checkbox" class="answChkC"
|
||||||
|
name="itmInnbArr[]"
|
||||||
|
value="${ itmCnList3.itmInnb }"
|
||||||
|
<c:forEach var="qesitmAnswList3" items="${qesitmAnswList}">
|
||||||
|
<c:if test="${qesitmAnswList3.itmInnb eq itmCnList3.itmInnb}">checked</c:if>
|
||||||
|
</c:forEach>>
|
||||||
|
<span class="check"></span>
|
||||||
|
<span class="control-label">${ itmCnList3.itmCn }</span>
|
||||||
|
</label>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${ qesitmList.itmTyCd eq '04'}">
|
||||||
|
<%--텍스트 유형--%>
|
||||||
|
<div class="reviewRadio__item">
|
||||||
|
<div class="reviewRadio__title">
|
||||||
|
<c:out value="${ qesitmList.qesitmNm }"/>
|
||||||
|
<c:if test="${qesitmList.qesitmEssntlAt eq 'Y'}">
|
||||||
|
<span class="required-asterisk">*</span>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
<div class="reviewRadio__inputRow">
|
||||||
|
<c:forEach items="${itmCnList}" var="itmCnList4">
|
||||||
|
<c:if test="${itmCnList4.qesitmInnb eq qesitmList.qesitmInnb}">
|
||||||
|
<input type="hidden" name="qesitmEssntlAtArr[]"
|
||||||
|
value="${ qesitmList.qesitmEssntlAt }"
|
||||||
|
class="essntlChk">
|
||||||
|
<input type="hidden" name="qesitmNmArr[]"
|
||||||
|
value="${ qesitmList.qesitmNm }">
|
||||||
|
<input type="hidden" name="qesitmAtArr[]"
|
||||||
|
class="answTxtAt qesitmAtChk" value="N">
|
||||||
|
<input type="hidden" class="answTxt"
|
||||||
|
name="qesitmInnbArr[]"
|
||||||
|
value="${ qesitmList.qesitmInnb }" disabled>
|
||||||
|
<input type="hidden" class="answTxt"
|
||||||
|
name="itmInnbArr[]"
|
||||||
|
value="${ itmCnList4.itmInnb }" disabled>
|
||||||
|
<input class="input-text full answTxtC" type="text"
|
||||||
|
name="answCnArr[]" title="추가문항답변"
|
||||||
|
placeholder="${ itmCnList4.itmCn }"
|
||||||
|
maxlength="666"
|
||||||
|
itm-cn="${ itmCnList4.itmCn }"
|
||||||
|
qesitm-innb="${itmCnList4.qesitmInnb}"
|
||||||
|
itm-innb="${itmCnList4.itmInnb}"
|
||||||
|
<c:forEach var="qesitmAnswList4"
|
||||||
|
items="${qesitmAnswList}">
|
||||||
|
<c:if test="${qesitmAnswList4.itmInnb eq itmCnList4.itmInnb}">
|
||||||
|
value="<c:out value = '${qesitmAnswList4.answCn}'/>"
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<div class="userForm__inputBox__item">
|
||||||
|
<div class="userForm__inputBox__itemTitle">제목<span
|
||||||
|
class="required-asterisk">*</span></div>
|
||||||
|
<input class="input-text full" type="text" title="해당 인풋에 대한 설명" name="sj"
|
||||||
|
maxlength='100'
|
||||||
|
placeholder="제목을 입력하세요."
|
||||||
|
value="<c:out value = "${bbscttInfo.sj}"/>">
|
||||||
|
<c:if test="${bbsInfo.secretBbsctt eq 'Y'}">
|
||||||
|
<div class="b-checkbox-container">
|
||||||
|
<label class="b-checkbox is-medium checkbox">
|
||||||
|
<input type="checkbox" value="Y" name="secretBbscttAt"
|
||||||
|
<c:if test="${bbscttInfo.secretBbscttAt eq 'Y'}">checked</c:if>
|
||||||
|
onclick="fn_prevent_click(event);">
|
||||||
|
<span class="check"></span>
|
||||||
|
<span class="control-label">비밀글</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
<div class="userForm__inputBox__item">
|
||||||
|
<div class="userForm__inputBox__itemTitle">내용</div>
|
||||||
|
<textarea class="textarea" rows="12" title="내용 입력란" id="cnBbsUpdt" name = "cn">
|
||||||
|
<c:out value="${bbscttInfo.cn}"/>
|
||||||
|
</textarea>
|
||||||
|
</div>
|
||||||
|
<%--게시판설정(파일첨부사용여부)--%>
|
||||||
|
<spring:eval expression="@environment.getProperty('sopmalfo.common.fileupload.extensions.images')" var="acceptFileExtensions"/>
|
||||||
|
<c:if test="${bbsInfo.filAtch eq 'Y'}">
|
||||||
|
<div class="fileUplaod">
|
||||||
|
<div class="fileUplaod__title">이미지 등록</div>
|
||||||
|
<div class="dropzone-wrapper">
|
||||||
|
<div class="dropzone" id="image-dropzone"></div>
|
||||||
|
</div>
|
||||||
|
<ul class="infoList">
|
||||||
|
<li>사진첨부는 최대 10MB 이하이며 3개까지 등록할 수 있습니다.</li>
|
||||||
|
<li>등록 가능 파일은 ${acceptFileExtensions} 파일만 가능합니다.</li>
|
||||||
|
<li>상품과 무관한 내용이거나 음란 불법적인 내용은 통보없이 삭제할 수 있습니다.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<input type = "hidden" name = "acceptFileExtensions" id = "acceptFileExtensions" value = "${acceptFileExtensions}"/>
|
||||||
|
</c:if>
|
||||||
|
<div class="bottomBtnControls">
|
||||||
|
<button type="button" class="btn xl theme" id = "updtBtn"><spring:message code="button.update"/>하기</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
<!-- 푸터 -->
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/mobile/Footer.jsp"/>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<%--수정 성공 모달--%>
|
||||||
|
<button type="button" style="display:none;" data-micromodal-trigger="successUpdtModal" id = "successBtn"></button>
|
||||||
|
<div class="microModal microAlert" id="successUpdtModal" aria-hidden="true">
|
||||||
|
<div class="microModal__overlay" tabindex="-1">
|
||||||
|
<div class="microModal__container" role="dialog" aria-modal="true">
|
||||||
|
<div class="microModal__body">
|
||||||
|
<div class="microModal__top">
|
||||||
|
<h2 class="microModal__title">
|
||||||
|
<spring:message code="success.common.update"/>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="microModal__btnContainer">
|
||||||
|
<button class="microModal__btn microModal__btn-primary" id = "alertBtn"><spring:message code="button.ok"/></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%--수정 컨펌 모달--%>
|
||||||
|
<button type="button" style="display:none;" data-micromodal-trigger="confirmUpdtModal" id = "confirmBtn"></button>
|
||||||
|
<div class="microModal microAlert" id="confirmUpdtModal" aria-hidden="true">
|
||||||
|
<div class="microModal__overlay" tabindex="-1">
|
||||||
|
<div class="microModal__container" role="dialog" aria-modal="true">
|
||||||
|
<div class="microModal__body">
|
||||||
|
<div class="microModal__top">
|
||||||
|
<h2 class="microModal__title">
|
||||||
|
<spring:message code="confirm.common.update"/>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="microModal__btnContainer">
|
||||||
|
<button class="microModal__btn" data-micromodal-close aria-label="창 닫기" id = "clsConfirmPopBtn"><spring:message code="button.cancel"/></button>
|
||||||
|
<button class="microModal__btn microModal__btn-primary" id = "confirmPopBtn"><spring:message code="button.ok"/></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
// Dropzone 파일업로드
|
||||||
|
if ($("#image-dropzone").length > 0) {
|
||||||
|
const maxFiles = 3;
|
||||||
|
Dropzone.autoDiscover = false;
|
||||||
|
var myDropzone = new Dropzone("#image-dropzone", {
|
||||||
|
url: "/file-upload",
|
||||||
|
maxFilesize: 10,
|
||||||
|
maxFiles: maxFiles,
|
||||||
|
acceptedFiles: "${acceptFileExtensions}",
|
||||||
|
autoProcessQueue: false,
|
||||||
|
addRemoveLinks: true,
|
||||||
|
dictDefaultMessage: "",
|
||||||
|
dictRemoveFile: "삭제",
|
||||||
|
dictCancelUpload: "취소",
|
||||||
|
dictCancelUploadConfirmation: "업로드를 취소하시겠습니까?",
|
||||||
|
dictInvalidFileType: "이 파일은 업로드할 수 없습니다.",
|
||||||
|
dictFileTooBig: "파일이 너무 큽니다. ({{filesize}}MB). 최대 파일 크기: {{maxFilesize}}MB.",
|
||||||
|
dictMaxFilesExceeded: "파일을 더 이상 추가할 수 없습니다.",
|
||||||
|
dictResponseError: "서버에서 응답을 받지 못했습니다.",
|
||||||
|
init: function () {
|
||||||
|
let dropzoneInstance = this;
|
||||||
|
let imageData = ${fileInfoGson};
|
||||||
|
// 각 이미지를 Dropzone에 추가
|
||||||
|
$.each(imageData, function (index, image) {
|
||||||
|
// Dropzone 파일 객체 생성
|
||||||
|
let mockFile = {name: image.orginlFilNm, size: image.filMg};
|
||||||
|
|
||||||
|
dropzoneInstance.emit("addedfile", mockFile);
|
||||||
|
const cdnurl = '<c:out value="${cdnurl}"/>';
|
||||||
|
const imagePath = cdnurl + image.filCours + image.sysFilNm;
|
||||||
|
dropzoneInstance.emit("thumbnail", mockFile, imagePath);
|
||||||
|
|
||||||
|
// 이미지 오류 처리
|
||||||
|
$(mockFile.previewElement).find("img").on("error", function () {
|
||||||
|
this.src = '/mobile/images/image_placeholder.png'; // 대체 이미지 경로로 설정
|
||||||
|
});
|
||||||
|
|
||||||
|
// Dropzone에 파일 추가
|
||||||
|
mockFile.customId = image.bbscttAtchmnfilInnb;
|
||||||
|
dropzoneInstance.files.push(mockFile);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 파일이 삭제될 때마다 호출되는 이벤트 핸들러
|
||||||
|
this.on("removedfile", function (file) {
|
||||||
|
const result = dropzoneDeleteFiles("" + file.customId + "", '<c:out value="${bbscttVO.sopmalCd}"/>', "BDFL", 1);
|
||||||
|
if (result === "N") {//파일 삭제 안할 시 복원
|
||||||
|
file.customData = {restored: true, customId: file.customId}; //삭제 취소에 의한 구분자 부여
|
||||||
|
myDropzone.emit("addedfile", file); // 파일을 다시 추가하여 삭제 취소
|
||||||
|
myDropzone.emit("thumbnail", file, file.dataURL); // 파일의 썸네일을 복원
|
||||||
|
}
|
||||||
|
if (myDropzone.files.length < maxFiles) {
|
||||||
|
$(".dz-message").show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//파일 추가
|
||||||
|
this.on("addedfile", function (file) {
|
||||||
|
let restoreAt = '';
|
||||||
|
if (file.customData) { //파일 삭제 복구시
|
||||||
|
restoreAt = true;
|
||||||
|
} else {//새파일 추가시
|
||||||
|
restoreAt = false;
|
||||||
|
}
|
||||||
|
if (restoreAt) {// 파일 삭제 복구시 해당 id 재부여
|
||||||
|
file.customId = file.customData.customId;
|
||||||
|
} else {//새파일 추가시 임시 id 부여
|
||||||
|
let fileLength = myDropzone.files.length;
|
||||||
|
file.customId = "temp" + fileLength;
|
||||||
|
if (fileLength > maxFiles) {
|
||||||
|
const dictMaxFilesExceeded = myDropzone.options.dictMaxFilesExceeded;
|
||||||
|
alert(dictMaxFilesExceeded);
|
||||||
|
this.removeFile(file);
|
||||||
|
$(file.previewElement).find(".dz-remove").attr("disabled", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// maxFiles 제한 관련 이벤트 핸들러
|
||||||
|
this.on("maxfilesexceeded", function (file) {
|
||||||
|
const dictMaxFilesExceeded = myDropzone.options.dictMaxFilesExceeded;
|
||||||
|
alert(dictMaxFilesExceeded);
|
||||||
|
this.removeFile(file);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var inputElement = $('input[type="file"].dz-hidden-input');
|
||||||
|
|
||||||
|
// name 부여
|
||||||
|
inputElement.attr('name', 'file');
|
||||||
|
|
||||||
|
// id 부여
|
||||||
|
inputElement.attr('id', 'fileUpload');
|
||||||
|
|
||||||
|
if (myDropzone.files.length < maxFiles) {
|
||||||
|
$(".dz-message").show();
|
||||||
|
} else {
|
||||||
|
$(".dz-message").hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//뒤로가기 이벤트 삭제 후 상품문의 페이지로 이동 (수정 후 바로 목록으로 이동)
|
||||||
|
$(".header__toBack__btn").off("click")
|
||||||
|
.on("click",function(){
|
||||||
|
window.location.href="/sopmal/mpage/act/selectNormalQnaInqire?bbsId=normal_qna";
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="myPageMain__logout" href="/logout">
|
<a class="myPageMain__logout" href="/sopmal/logout">
|
||||||
<i class="icon icon_myLogout"></i>
|
<i class="icon icon_myLogout"></i>
|
||||||
로그아웃
|
로그아웃
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
$("#custom_alert").off();
|
$("#custom_alert").off();
|
||||||
$("#custom_alert").on("click",function(){
|
$("#custom_alert").on("click",function(){
|
||||||
closeModal("custom_alert");
|
closeModal("custom_alert");
|
||||||
location.href ="/logout";
|
location.href ="/sopmal/logout";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -803,7 +803,7 @@
|
|||||||
</c:forEach>
|
</c:forEach>
|
||||||
<c:if test = "${order.ordrSttusCd eq '15'}">
|
<c:if test = "${order.ordrSttusCd eq '15'}">
|
||||||
<div class="orderDetailProduct__btnControls">
|
<div class="orderDetailProduct__btnControls">
|
||||||
<a href="javascript:void(0);" onclick="fn_post_cancl_ordr_confirm('${goods.sopmalCd}', '${goods.ordrInnb}', '${order.ordrSttusCd}');" class="btn gray full">주문취소</a>
|
<a href="javascript:void(0);" onclick="fn_post_cancl_ordr_confirm('${order.sopmalCd}', '${order.ordrInnb}', '${order.ordrSttusCd}');" class="btn gray full">주문취소</a>
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|||||||
@@ -974,6 +974,9 @@
|
|||||||
<div class="detailTop">
|
<div class="detailTop">
|
||||||
<p class="detailTop__title">총 <em><c:out value="${fn:length(data.shippingList)}"/>곳</em>의 배송지로 주문하셨습니다.</p>
|
<p class="detailTop__title">총 <em><c:out value="${fn:length(data.shippingList)}"/>곳</em>의 배송지로 주문하셨습니다.</p>
|
||||||
<c:choose>
|
<c:choose>
|
||||||
|
<c:when test="${order.ordrSttusCd == 15}">
|
||||||
|
<a href="javascript:void(0);" onclick="fn_post_cancl_ordr('<c:out value="${order.sopmalCd}"/>', '<c:out value="${order.ordrInnb}"/>', '<c:out value="${order.ordrSttusCd}"/>');" class="btn gray2">주문취소</a>
|
||||||
|
</c:when>
|
||||||
<c:when test="${order.ordrSttusCd == 25}">
|
<c:when test="${order.ordrSttusCd == 25}">
|
||||||
<a href="javascript:void(0);" onclick="fn_call_setle_cancl_pop('<c:out value="${order.sopmalCd}"/>', '<c:out value="${order.ordrInnb}"/>', '', '<c:out value="${setleDt}"/>', '<c:out value="${setleTyCd}"/>', '<c:out value="${order.ordrSttusCd}"/>');" class="btn gray2">전체 결제취소</a>
|
<a href="javascript:void(0);" onclick="fn_call_setle_cancl_pop('<c:out value="${order.sopmalCd}"/>', '<c:out value="${order.ordrInnb}"/>', '', '<c:out value="${setleDt}"/>', '<c:out value="${setleTyCd}"/>', '<c:out value="${order.ordrSttusCd}"/>');" class="btn gray2">전체 결제취소</a>
|
||||||
</c:when>
|
</c:when>
|
||||||
|
|||||||
@@ -2360,49 +2360,66 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
table += ' <tr>';
|
table += ' <tr>';
|
||||||
table += ' <th>발급정보</th>';
|
table += ' <th></th>';
|
||||||
table += ' <td>';
|
table += ' <td>';
|
||||||
table += ' <div class="td-inner">';
|
table += ' <div style="display: none">';
|
||||||
table += ' <div class="custom-radio-container">';
|
table += ' <div class="custom-radio-container">';
|
||||||
table += ' <div class="custom-radio is-medium">';
|
table += ' <div class="custom-radio is-medium">';
|
||||||
table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtN_' + id + '" value="" checked>';
|
table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtN_' + id + '" value="" checked>';
|
||||||
table += ' <label for="cshRciptIssuAtN_' + id + '">발급안함</label>';
|
// table += ' <label for="cshRciptIssuAtN_' + id + '">발급안함</label>';
|
||||||
table += ' </div>';
|
table += ' </div>';
|
||||||
table += ' <div class="custom-radio is-medium">';
|
table += ' <div class="custom-radio is-medium">';
|
||||||
table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtY_' + id + '" value="01" >';
|
table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtY_' + id + '" value="01" >';
|
||||||
table += ' <label for="cshRciptIssuAtY_' + id + '">현금영수증</label>';
|
// table += ' <label for="cshRciptIssuAtY_' + id + '">현금영수증</label>';
|
||||||
table += ' </div>';
|
table += ' </div>';
|
||||||
table += ' </div>';
|
table += ' </div>';
|
||||||
table += ' </div>';
|
table += ' </div>';
|
||||||
table += ' </td>';
|
table += ' </td>';
|
||||||
table += ' </tr>';
|
table += ' </tr>';
|
||||||
table += ' <tr>';
|
// table += ' <tr>';
|
||||||
table += ' <th></th>';
|
// table += ' <th>발급정보</th>';
|
||||||
table += ' <td>';
|
// table += ' <td>';
|
||||||
table += ' <div id="cshRciptIssu" style="display: none">';
|
// table += ' <div class="td-inner">';
|
||||||
table += ' <div>';
|
// table += ' <div class="custom-radio-container">';
|
||||||
table += ' <span class="visually-hidden">발급안함</span>';
|
// table += ' <div class="custom-radio is-medium">';
|
||||||
table += ' </div>';
|
// table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtN_' + id + '" value="" checked>';
|
||||||
table += ' <div class="td-inner vertical">';
|
// table += ' <label for="cshRciptIssuAtN_' + id + '">발급안함</label>';
|
||||||
table += ' <div class="custom-radio-container cashReceipt-borderTop">';
|
// table += ' </div>';
|
||||||
table += ' <div class="custom-radio is-medium">';
|
// table += ' <div class="custom-radio is-medium">';
|
||||||
table += ' <input type="radio" name="issuTrgetDvCd" id="issuTrgetDvCd0_' + id + '" value="01" checked>';
|
// table += ' <input type="radio" name="cshRciptIssuAt" id="cshRciptIssuAtY_' + id + '" value="01" >';
|
||||||
table += ' <label for="issuTrgetDvCd0_' + id + '">개인 소득공제</label>';
|
// table += ' <label for="cshRciptIssuAtY_' + id + '">현금영수증</label>';
|
||||||
table += ' </div>';
|
// table += ' </div>';
|
||||||
table += ' <div class="custom-radio is-medium">';
|
// table += ' </div>';
|
||||||
table += ' <input type="radio" name="issuTrgetDvCd" id="issuTrgetDvCd1_' + id + '" value="02">';
|
// table += ' </div>';
|
||||||
table += ' <label for="issuTrgetDvCd1_' + id + '">사업자 지출증빙</label>';
|
// table += ' </td>';
|
||||||
table += ' </div>';
|
// table += ' </tr>';
|
||||||
table += ' </div>';
|
// table += ' <tr>';
|
||||||
table += ' <div class="w-full">';
|
// table += ' <th></th>';
|
||||||
table += ' <input type="text" name="issuTrgetMbtlnb" id="issuTrgetMbtlnb" oninput="fn_set_event(this, \'keyup\', fn_fmt_telno);" class="input-text md csh-rcipt-issu" maxlength="13" title="휴대폰번호" placeholder="휴대폰번호(\' - \'없이 입력)">';
|
// table += ' <td>';
|
||||||
table += ' <input type="text" name="issuTrgetBsnmNb" id="issuTrgetBsnmNb" class="number-only input-text md csh-rcipt-issu" maxlength="10" title="사업자번호" placeholder="사업자번호(\' - \'없이 입력)" style="display: none">';
|
// table += ' <div id="cshRciptIssu" style="display: none">';
|
||||||
table += ' </div>';
|
// table += ' <div>';
|
||||||
table += ' <p class="fyi gray-7 mt-10 ml-10">결제창에서 다시 현금영수증을 신청하지 마세요. 중복발행 됩니다.</p>';
|
// table += ' <span class="visually-hidden">발급안함</span>';
|
||||||
table += ' </div>';
|
// table += ' </div>';
|
||||||
table += ' </div>';
|
// table += ' <div class="td-inner vertical">';
|
||||||
table += ' </td>';
|
// table += ' <div class="custom-radio-container cashReceipt-borderTop">';
|
||||||
table += ' </tr>';
|
// table += ' <div class="custom-radio is-medium">';
|
||||||
|
// table += ' <input type="radio" name="issuTrgetDvCd" id="issuTrgetDvCd0_' + id + '" value="01" checked>';
|
||||||
|
// table += ' <label for="issuTrgetDvCd0_' + id + '">개인 소득공제</label>';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' <div class="custom-radio is-medium">';
|
||||||
|
// table += ' <input type="radio" name="issuTrgetDvCd" id="issuTrgetDvCd1_' + id + '" value="02">';
|
||||||
|
// table += ' <label for="issuTrgetDvCd1_' + id + '">사업자 지출증빙</label>';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' <div class="w-full">';
|
||||||
|
// table += ' <input type="text" name="issuTrgetMbtlnb" id="issuTrgetMbtlnb" oninput="fn_set_event(this, \'keyup\', fn_fmt_telno);" class="input-text md csh-rcipt-issu" maxlength="13" title="휴대폰번호" placeholder="휴대폰번호(\' - \'없이 입력)">';
|
||||||
|
// table += ' <input type="text" name="issuTrgetBsnmNb" id="issuTrgetBsnmNb" class="number-only input-text md csh-rcipt-issu" maxlength="10" title="사업자번호" placeholder="사업자번호(\' - \'없이 입력)" style="display: none">';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' <p class="fyi gray-7 mt-10 ml-10">결제창에서 다시 현금영수증을 신청하지 마세요. 중복발행 됩니다.</p>';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' </div>';
|
||||||
|
// table += ' </td>';
|
||||||
|
// table += ' </tr>';
|
||||||
table += ' </tbody>';
|
table += ' </tbody>';
|
||||||
table += '</table>';
|
table += '</table>';
|
||||||
|
|
||||||
@@ -3371,7 +3388,14 @@
|
|||||||
const setup = setupNbkDpstVOList[i];
|
const setup = setupNbkDpstVOList[i];
|
||||||
const title = setup.bankNm + ' ' + setup.acntnb + ' ' + setup.dpstrNm;
|
const title = setup.bankNm + ' ' + setup.acntnb + ' ' + setup.dpstrNm;
|
||||||
|
|
||||||
const option = '<option value="' + setup.acntnb + '" bnnk-nm="' + setup.bankNm + '" dpstr-nm="' + setup.dpstrNm + '">' + title + '</option>';
|
let option = '<option value="' + setup.acntnb + '" bnnk-nm="' + setup.bankNm + '" dpstr-nm="' + setup.dpstrNm + '">' + title + '</option>';
|
||||||
|
|
||||||
|
if(i === 0) {
|
||||||
|
// 첫번째만 selected 되게 설정
|
||||||
|
option = '<option value="' + setup.acntnb + '" bnnk-nm="' + setup.bankNm + '" dpstr-nm="' + setup.dpstrNm + '" selected>' + title + '</option>';
|
||||||
|
} else {
|
||||||
|
option = '<option value="' + setup.acntnb + '" bnnk-nm="' + setup.bankNm + '" dpstr-nm="' + setup.dpstrNm + '">' + title + '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
$(div).find('table tr #rcpmnyAcntnb').append(option);
|
$(div).find('table tr #rcpmnyAcntnb').append(option);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,8 +39,14 @@
|
|||||||
// gcpay 사용안할 경우 기본 세팅
|
// gcpay 사용안할 경우 기본 세팅
|
||||||
const gcpayCardUseAt = $('#gcpayCardUseAt').val();
|
const gcpayCardUseAt = $('#gcpayCardUseAt').val();
|
||||||
let gcpayAt = ( gcpayCardUseAt === 'Y')? 'Y' : 'N';
|
let gcpayAt = ( gcpayCardUseAt === 'Y')? 'Y' : 'N';
|
||||||
const setleTy = $('#setleSetupTyCd').val(); //01:kcp, 02:toss
|
const setleTy = $('#setleSetupTyCd').val();
|
||||||
const setleTyCd = (setleTy==='01')?'#pg04':'#pg03';
|
//const setleTyCd = (setleTy==='01')?'#pg04':'#pg03';
|
||||||
|
|
||||||
|
let setleTyCd = '#pg04';
|
||||||
|
if(setleTy==='01')setleTyCd = '#pg04'; //kcp
|
||||||
|
else if(setleTy==='02')setleTyCd = '#pg03'; //toss
|
||||||
|
else if(setleTy==='03')setleTyCd = '#pg06'; //kiwoom
|
||||||
|
|
||||||
if (gcpayAt === 'N') {
|
if (gcpayAt === 'N') {
|
||||||
$(setleTyCd).click();
|
$(setleTyCd).click();
|
||||||
}
|
}
|
||||||
@@ -569,7 +575,13 @@
|
|||||||
|
|
||||||
$(form).find('.pgContent').hide();
|
$(form).find('.pgContent').hide();
|
||||||
$(form).find('#' + id + 'Content').show();
|
$(form).find('#' + id + 'Content').show();
|
||||||
$(form).find('#setleSetupTyCd').val() === '01' ? $(form).find('#pg04Content').show() : $(form).find('#pg03Content').show();
|
|
||||||
|
//$(form).find('#setleSetupTyCd').val() === '01' ? $(form).find('#pg04Content').show() : $(form).find('#pg03Content').show();
|
||||||
|
if($(form).find('#setleSetupTyCd').val() === '01'){$(form).find('#pg04Content').show();}
|
||||||
|
else if($(form).find('#setleSetupTyCd').val() === '02'){$(form).find('#pg03Content').show();}
|
||||||
|
else if($(form).find('#setleSetupTyCd').val() === '03'){$(form).find('#pg06Content').show();}
|
||||||
|
|
||||||
|
|
||||||
$('.order-method-normal__btn').removeClass('active');
|
$('.order-method-normal__btn').removeClass('active');
|
||||||
$(form).find('#pgCmpnyNm').val(pgCmpnyNm);
|
$(form).find('#pgCmpnyNm').val(pgCmpnyNm);
|
||||||
|
|
||||||
@@ -624,7 +636,10 @@
|
|||||||
const content = $('.order-method-normal__content');
|
const content = $('.order-method-normal__content');
|
||||||
const useCashMlgAmt = $('#useCashMlgAmt').val();
|
const useCashMlgAmt = $('#useCashMlgAmt').val();
|
||||||
|
|
||||||
$('#setleSetupTyCd').val() === '01' ? $('#pg04').click() : $('#pg03').click();
|
//$('#setleSetupTyCd').val() === '01' ? $('#pg04').click() : $('#pg03').click();
|
||||||
|
if($('#setleSetupTyCd').val() === '01'){$('#pg04').click();}
|
||||||
|
else if($('#setleSetupTyCd').val() === '02'){$('#pg03').click();}
|
||||||
|
else if($('#setleSetupTyCd').val() === '03'){$('#pg06').click();}
|
||||||
|
|
||||||
$('.order-method-normal__btn').removeClass('active');
|
$('.order-method-normal__btn').removeClass('active');
|
||||||
$(this).addClass('active');
|
$(this).addClass('active');
|
||||||
@@ -1985,7 +2000,7 @@
|
|||||||
// }
|
// }
|
||||||
div += ' <p class="cartItem__productBottom">';
|
div += ' <p class="cartItem__productBottom">';
|
||||||
div += ' <span class="cartItem__productPrice">';
|
div += ' <span class="cartItem__productPrice">';
|
||||||
div += ' <span class="comma product-dscntApplyAmt">' + (goods.selpric).toLocaleString() + '</span><span class="priceUnit">' + curUnit + '</span>';
|
div += ' <span class="comma product-dscntApplyAmt">' + (goods.slepric).toLocaleString() + '</span><span class="priceUnit">' + curUnit + '</span>';
|
||||||
div += ' </span>';
|
div += ' </span>';
|
||||||
div += ' <span class="cartItem__productDot">·</span>';
|
div += ' <span class="cartItem__productDot">·</span>';
|
||||||
div += ' <span class="cartItem__productQuantity">' + goods.qy + '개</span>';
|
div += ' <span class="cartItem__productQuantity">' + goods.qy + '개</span>';
|
||||||
@@ -3083,7 +3098,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('kcp' === pgCmpnyNm || 'toss' === pgCmpnyNm) {
|
if ('kcp' === pgCmpnyNm || 'toss' === pgCmpnyNm || 'kiwoom' === pgCmpnyNm) {
|
||||||
const div = $('#setleForm').find('.order-method-normal');
|
const div = $('#setleForm').find('.order-method-normal');
|
||||||
|
|
||||||
if (!$(div).find('.order-method-normal__btn-container button').hasClass('active')) {
|
if (!$(div).find('.order-method-normal__btn-container button').hasClass('active')) {
|
||||||
@@ -3124,7 +3139,13 @@
|
|||||||
const id = '01' === issuTrgetDvCd ? 'issuTrgetMbtlnb' : 'issuTrgetBsnmNb';
|
const id = '01' === issuTrgetDvCd ? 'issuTrgetMbtlnb' : 'issuTrgetBsnmNb';
|
||||||
let rlPgCmpnyNm = $('#pgCmpnyNm').val();
|
let rlPgCmpnyNm = $('#pgCmpnyNm').val();
|
||||||
|
|
||||||
let setleTyId = $('kcp' === pgCmpnyNm ? '#pg04Content' : '#pg03Content').find('button[name="' + setleTyCd + '"]').attr('id');
|
//let setleTyId = $('kcp' === pgCmpnyNm ? '#pg04Content' : '#pg03Content').find('button[name="' + setleTyCd + '"]').attr('id');
|
||||||
|
|
||||||
|
let pgCont = "";
|
||||||
|
if('kiwoom' === pgCmpnyNm) pgCont='pg06Content';
|
||||||
|
else if('kcp' === pgCmpnyNm) pgCont='pg04Content';
|
||||||
|
else pgCont='pg03Content';
|
||||||
|
let setleTyId = $('#'+pgCont).find('button[name="' + setleTyCd + '"]').attr('id');
|
||||||
|
|
||||||
if ('tosspay' === rlPgCmpnyNm) {
|
if ('tosspay' === rlPgCmpnyNm) {
|
||||||
setleTyId = 'acount'
|
setleTyId = 'acount'
|
||||||
@@ -3301,7 +3322,7 @@
|
|||||||
// const enuriObj = JSON.parse(enuri);
|
// const enuriObj = JSON.parse(enuri);
|
||||||
// const setleAmtFromEnuri = enuriObj['setleAmt']; // 계산된 결제금액
|
// const setleAmtFromEnuri = enuriObj['setleAmt']; // 계산된 결제금액
|
||||||
const setleAmtFromSubsvc = order.goodsList.reduce(function(sum, item){
|
const setleAmtFromSubsvc = order.goodsList.reduce(function(sum, item){
|
||||||
return sum + Number(item.selpric || 0); // 계산된 결제금액
|
return sum + Number(item.slepric || 0); // 계산된 결제금액
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
if (setleAmtFromOrder !== setleAmtFromSubsvc.toString()) {
|
if (setleAmtFromOrder !== setleAmtFromSubsvc.toString()) {
|
||||||
@@ -4523,6 +4544,138 @@
|
|||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
<%-- kcp 결제 종료 --%>
|
<%-- kcp 결제 종료 --%>
|
||||||
|
|
||||||
|
<%-- 키움 결제 시작 --%>
|
||||||
|
<c:if test="${'03' eq payInfo.setleSetupTyCd}">
|
||||||
|
<div class="custom-radio is-medium">
|
||||||
|
<input type="radio" name="pg" id="pg06" value="kiwoom">
|
||||||
|
<label for="pg06">일반결제</label>
|
||||||
|
</div>
|
||||||
|
<div id="pg06Content" class="pgContent order-method-normal" >
|
||||||
|
<div class="order-method-normal__btn-container">
|
||||||
|
<c:if test="${'Y' eq payInfo.cardUseAt}">
|
||||||
|
<button type="button" name="01" id="card" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--card"></div>신용카드
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<%--
|
||||||
|
<c:if test="${'Y' eq payInfo.rltmAcntUseAt}">
|
||||||
|
<button type="button" name="03" id="acount" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--transfer"></div>실시간 계좌이체
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
--%>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntUseAt}">
|
||||||
|
<button type="button" name="04" id="virtual" class="order-method-normal__btn">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--account"></div>가상계좌
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntEscwUseAt}">
|
||||||
|
<button type="button" name="05" id="escrow-virtual" class="order-method-normal__btn not_multi_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--account"></div>가상계좌(에스크로)
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.nbkkUseAt}">
|
||||||
|
<button type="button" name="02" id="bank" class="order-method-normal__btn">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--deposit"></div>무통장
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.paycoUseAt}">
|
||||||
|
<button type="button" name="10" id="payco" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--payco"></div>PAYCO
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.tpayUseAt}">
|
||||||
|
<button type="button" name="tosspay" id="tosspay" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--toss"></div>토스페이
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.npayUseAt}">
|
||||||
|
<button type="button" name="naverpay" id="naverpay" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--naver"></div>네이버페이
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.kpayUseAt}">
|
||||||
|
<button type="button" name="kakaopay" id="kakaopay" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--kakao"></div>카카오페이
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
<div class="order-method-normal__content-wrapper">
|
||||||
|
<c:if test="${'Y' eq payInfo.cardUseAt}">
|
||||||
|
<div id="card-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="card-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<p class="fyi gray-7 mt-10 ml-10 noempty">발급정보 : 카드매출전표(또는 휴대폰결제전표)로 대체합니다.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<%--
|
||||||
|
<c:if test="${'Y' eq payInfo.rltmAcntUseAt}">
|
||||||
|
<div id="acount-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="acount-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
--%>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntUseAt}">
|
||||||
|
<div id="virtual-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="virtual-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntEscwUseAt}">
|
||||||
|
<div id="escrow-virtual-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="escrow-virtual-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.nbkkUseAt}">
|
||||||
|
<div id="bank-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="bank-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.paycoUseAt}">
|
||||||
|
<div id="payco-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="payco-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<div class="infoBox noempty">
|
||||||
|
<h6 class="infoBox__title">PAYCO 간편결제 안내</h6>
|
||||||
|
<ol class="infoBox__list">
|
||||||
|
<li>PAYCO는 온/오프라인 쇼핑은 물론 송금, 멤버십 적립까지 가능한 통합 서비스입니다.</li>
|
||||||
|
<li>휴대폰과 카드 명의자가 동일해야 결제 가능하며, 결제금액 제한은 없습니다.
|
||||||
|
<br>- 지원카드: 모든 국내 신용/체크카드
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<p class="textInfo noempty"><i class="icon icon_textInfo--sm"></i>발급정보 : 카드매출전표(또는 휴대폰결제전표)로 대체합니다.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.tpayUseAt}">
|
||||||
|
<div id="acount-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="acount-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<p class="fyi gray-7 mt-10 ml-10 noempty">발급정보 : 카드매출전표(또는 휴대폰결제전표)로 대체합니다.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.npayUseAt}">
|
||||||
|
<div id="naverpay-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="naverpay-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<div class="noempty">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.kpayUseAt}">
|
||||||
|
<div id="kakaopay-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="kakaopay-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<div class="noempty">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<%-- 키움 결제 종료 --%>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user