fix : 관리자 구독서비스 상품변경 관리
This commit is contained in:
@@ -43,4 +43,7 @@ public interface BOSubsvcOrdrMapper {
|
|||||||
/** 구독서비스 상품준비 관리 상품매칭 - 5. GC_SUBSVC update*/
|
/** 구독서비스 상품준비 관리 상품매칭 - 5. GC_SUBSVC update*/
|
||||||
int updateBOSubsvcGoodsMappgSubsvc(BOSubsvcOrderVO vo);
|
int updateBOSubsvcGoodsMappgSubsvc(BOSubsvcOrderVO vo);
|
||||||
|
|
||||||
|
/** 구독서비스 상품변경 관리 목록*/
|
||||||
|
List<DataMap> selectBOSubsvcOrderMappedList(BOSubsvcOrderVO vo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,4 +166,28 @@ public class BOSubsvcOrdrService {
|
|||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 구독서비스 상품변경 관리 목록
|
||||||
|
* @param vo
|
||||||
|
* @return List<DataMap>
|
||||||
|
*/
|
||||||
|
public List<DataMap> selectBOSubsvcOrderMappedList(BOSubsvcOrderVO vo) {
|
||||||
|
List<DataMap> dataList = new ArrayList<>();
|
||||||
|
|
||||||
|
try {
|
||||||
|
dataList = mapper.selectBOSubsvcOrderMappedList(vo);
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
if(dataList == null || dataList.isEmpty()){
|
||||||
|
vo.getPaginationInfo().setTotalRecordCount(0);
|
||||||
|
}else{
|
||||||
|
vo.getPaginationInfo().setTotalRecordCount(((Long)dataList.get(0).get("totCnt")).intValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
return dataList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,4 +67,10 @@ private static final long serialVersionUID = 1L;
|
|||||||
private List<String> arrSubsvcInnb;
|
private List<String> arrSubsvcInnb;
|
||||||
/**당월제외*/
|
/**당월제외*/
|
||||||
private String srchCurMonExclude;
|
private String srchCurMonExclude;
|
||||||
|
/**주문번호*/
|
||||||
|
private String srchOrdrInnb;
|
||||||
|
/**주문자명*/
|
||||||
|
private String srchMbrNm;
|
||||||
|
/**주문자ID*/
|
||||||
|
private String srchMbrId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public class SubsvcOrdrController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value="/selectSubsvcOrdrListForm")
|
@RequestMapping(value="/selectSubsvcOrdrListForm")
|
||||||
public String selectSubsvcListForm(BOSubsvcVO subsvcVO, BOSubsvcOrderVO subsvcOrderVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
public String selectSubsvcOrdrListForm(BOSubsvcVO subsvcVO, BOSubsvcOrderVO subsvcOrderVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||||
subsvcVO.setSopmalCd(authSopmalCd);
|
subsvcVO.setSopmalCd(authSopmalCd);
|
||||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
@@ -133,7 +133,7 @@ public class SubsvcOrdrController {
|
|||||||
*/
|
*/
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
@RequestMapping(value = "/selectSubsvcOrdrList")
|
@RequestMapping(value = "/selectSubsvcOrdrList")
|
||||||
public String selectSubsvcList(BOSubsvcOrderVO subsvcOrderVO,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
public String selectSubsvcOrdrList(BOSubsvcOrderVO subsvcOrderVO,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||||
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||||
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
if("01".equals(user.getSysDvCd())){
|
if("01".equals(user.getSysDvCd())){
|
||||||
@@ -248,4 +248,76 @@ public class SubsvcOrdrController {
|
|||||||
return "mngr/ordr/subsvc/SubsvcOrdrDlvyListPop";
|
return "mngr/ordr/subsvc/SubsvcOrdrDlvyListPop";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 구독서비스 상품변경 조회 폼
|
||||||
|
* @param subsvcVO,subsvcOrderVO,model,authSopmalCd
|
||||||
|
* @return SubsvcOrdrMappedListForm.jsp
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@RequestMapping(value="/selectSubsvcOrdrMappedListForm")
|
||||||
|
public String selectSubsvcOrdrMappedListForm(BOSubsvcVO subsvcVO, BOSubsvcOrderVO subsvcOrderVO, ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||||
|
subsvcVO.setSopmalCd(authSopmalCd);
|
||||||
|
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
subsvcVO.setSopmalCd(user.getSopmalCd());
|
||||||
|
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
content.put("paramVO", subsvcOrderVO);
|
||||||
|
|
||||||
|
// 조회조건 구독서비스
|
||||||
|
List<?> SrchSubsvcList = boSubsvcService.selectBOMngrSrchSubsvcList(subsvcVO);
|
||||||
|
content.put("srchSubsvcList", SrchSubsvcList);
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
return "mngr/ordr/subsvc/SubsvcOrdrMappedListForm";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 구독서비스 상품변경 목록 조회 리스트
|
||||||
|
* @param subsvcOrderVO
|
||||||
|
* @param model
|
||||||
|
* @return SubsvcOrdrMappedList.jsp
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@RequestMapping(value = "/selectSubsvcOrdrMappedList")
|
||||||
|
public String selectSubsvcOrdrMappedList(BOSubsvcOrderVO subsvcOrderVO,ModelMap model, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||||
|
subsvcOrderVO.setSopmalCd(authSopmalCd);
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
if("01".equals(user.getSysDvCd())){
|
||||||
|
subsvcOrderVO.setSopmalCd(user.getSopmalCd());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 페이징 객체 생성 & 페이징정보 할당
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(subsvcOrderVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(subsvcOrderVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
|
||||||
|
subsvcOrderVO.setPaginationInfo(paginationInfo);
|
||||||
|
subsvcOrderVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
subsvcOrderVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
subsvcOrderVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
if(StringUtils.isEmpty(subsvcOrderVO.getSortDv())){
|
||||||
|
//정렬기준 초기값 셋팅
|
||||||
|
subsvcOrderVO.setSortDv("subsvcGnrAsc");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 목록 조회
|
||||||
|
List<DataMap> list = boSubsvcOrdrService.selectBOSubsvcOrderMappedList(subsvcOrderVO);
|
||||||
|
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
content.put("paramVO", subsvcOrderVO);
|
||||||
|
|
||||||
|
content.put("list", list);
|
||||||
|
content.put("paginationInfo", subsvcOrderVO.getPaginationInfo());
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
|
||||||
|
return "mngr/ordr/subsvc/SubsvcOrdrMappedList";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,16 +35,16 @@
|
|||||||
WHERE GO.USE_AT = 'Y'
|
WHERE GO.USE_AT = 'Y'
|
||||||
AND GO.SUBSVC_AT = 'Y'
|
AND GO.SUBSVC_AT = 'Y'
|
||||||
AND GO.SOPMAL_CD = #{sopmalCd}
|
AND GO.SOPMAL_CD = #{sopmalCd}
|
||||||
<if test="srchSelSubsvcNm != null and srchSelSubsvcNm != ''">
|
<if test='srchSelSubsvcNm != null and srchSelSubsvcNm != ""'>
|
||||||
AND GS.SUBSVC_NM = #{srchSelSubsvcNm} /*구독서비스 명*/
|
AND GS.SUBSVC_NM = #{srchSelSubsvcNm} /*구독서비스 명*/
|
||||||
</if>
|
</if>
|
||||||
<if test="srchSelSubsvcGnr != null and srchSelSubsvcGnr != ''">
|
<if test='srchSelSubsvcGnr != null and srchSelSubsvcGnr != ""'>
|
||||||
AND GS.SUBSVC_GNR = #{srchSelSubsvcGnr} /*기수*/
|
AND GS.SUBSVC_GNR = #{srchSelSubsvcGnr} /*기수*/
|
||||||
</if>
|
</if>
|
||||||
<if test="srchSubsvcNm != null and srchSubsvcNm != ''">
|
<if test='srchSubsvcNm != null and srchSubsvcNm != ""'>
|
||||||
AND GS.SUBSVC_NM LIKE CONCAT('%',#{srchSubsvcNm},'%') /*구독서비스 명*/
|
AND GS.SUBSVC_NM LIKE CONCAT('%',#{srchSubsvcNm},'%') /*구독서비스 명*/
|
||||||
</if>
|
</if>
|
||||||
<if test="srchSubsvcGnrNm != null and srchSubsvcGnrNm != ''">
|
<if test='srchSubsvcGnrNm != null and srchSubsvcGnrNm != ""'>
|
||||||
AND GS.SUBSVC_GNR_NM LIKE CONCAT('%',#{srchSubsvcGnrNm},'%') /*기수명*/
|
AND GS.SUBSVC_GNR_NM LIKE CONCAT('%',#{srchSubsvcGnrNm},'%') /*기수명*/
|
||||||
</if>
|
</if>
|
||||||
) MAIN
|
) MAIN
|
||||||
@@ -57,32 +57,32 @@
|
|||||||
]]>
|
]]>
|
||||||
</if>
|
</if>
|
||||||
<choose>
|
<choose>
|
||||||
<when test="sortDv == 'subsvcGnrAsc'">
|
<when test='sortDv == "subsvcGnrAsc"'>
|
||||||
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC /*구독서비스명+기수*/
|
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC /*구독서비스명+기수*/
|
||||||
</when>
|
</when>
|
||||||
<when test="sortDv == 'subsvcGnrDesc'">
|
<when test='sortDv == "subsvcGnrDesc"'>
|
||||||
ORDER BY SUBSVC_NM DESC, SUBSVC_GNR DESC /*구독서비스명+기수*/
|
ORDER BY SUBSVC_NM DESC, SUBSVC_GNR DESC /*구독서비스명+기수*/
|
||||||
</when>
|
</when>
|
||||||
<when test="sortDv == 'mbrAsc'">
|
<when test='sortDv == "mbrAsc"'>
|
||||||
ORDER BY MBR_NM ASC, MBR_ID ASC /*주문자순*/
|
ORDER BY MBR_NM ASC, MBR_ID ASC /*주문자순*/
|
||||||
</when>
|
</when>
|
||||||
<when test="sortDv == 'mbrDesc'">
|
<when test='sortDv == "mbrDesc"'>
|
||||||
ORDER BY MBR_NM DESC, MBR_ID DESC /*주문자순*/
|
ORDER BY MBR_NM DESC, MBR_ID DESC /*주문자순*/
|
||||||
</when>
|
</when>
|
||||||
<when test="sortDv == 'ordrAsc'">
|
<when test='sortDv == "ordrAsc"'>
|
||||||
ORDER BY ORDR_INNB ASC /*주문번호순*/
|
ORDER BY ORDR_INNB ASC /*주문번호순*/
|
||||||
</when>
|
</when>
|
||||||
<when test="sortDv == 'ordrDesc'">
|
<when test='sortDv == "ordrDesc"'>
|
||||||
ORDER BY ORDR_INNB DESC /*주문번호순*/
|
ORDER BY ORDR_INNB DESC /*주문번호순*/
|
||||||
</when>
|
</when>
|
||||||
<when test="sortDv == 'lastPrcsDtAsc'">
|
<when test='sortDv == "lastPrcsDtAsc"'>
|
||||||
ORDER BY LAST_PRCS_DT ASC /*최종처리일순*/
|
ORDER BY LAST_PRCS_DT ASC /*최종처리일순*/
|
||||||
</when>
|
</when>
|
||||||
<when test="sortDv == 'lastPrcsDtDesc'">
|
<when test='sortDv == "lastPrcsDtDesc"'>
|
||||||
ORDER BY LAST_PRCS_DT ASC /*최종처리일순*/
|
ORDER BY LAST_PRCS_DT ASC /*최종처리일순*/
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
ORDER BY GS.SUBSVC_NM ASC, GS.SUBSVC_GNR ASC
|
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
) PV
|
) PV
|
||||||
@@ -235,6 +235,106 @@
|
|||||||
WHERE GS.SOPMAL_CD = MAIN.SOPMAL_CD
|
WHERE GS.SOPMAL_CD = MAIN.SOPMAL_CD
|
||||||
AND GS.SUBSVC_INNB = MAIN.SUBSVC_INNB
|
AND GS.SUBSVC_INNB = MAIN.SUBSVC_INNB
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<!--구독서비스 상품준비 관리 목록-->
|
||||||
|
<select id="selectBOSubsvcOrderMappedList" parameterType="com.wb.domainserver.domain.gcone.ordr.subsvc.vo.BOSubsvcOrderVO" resultType="dataMap">
|
||||||
|
SELECT *
|
||||||
|
FROM (
|
||||||
|
SELECT CAST(@ROWNUM:=@ROWNUM + 1 AS UNSIGNED) AS RNUM
|
||||||
|
, COUNT(*) OVER() AS TOT_CNT
|
||||||
|
, MAIN.*
|
||||||
|
FROM (
|
||||||
|
SELECT ROW_NUMBER() OVER(PARTITION BY GO.ORDR_INNB ORDER BY GOI.ORDR_GOODS_INNB ASC, GOIO.ORDR_GOODS_OPTN_INNB ASC) AS CURT_PROCS_ODR /*차수*/
|
||||||
|
, GO.ORDR_INNB /*주문번호*/
|
||||||
|
, GOI.ORDR_GOODS_INNB
|
||||||
|
, GOIO.ORDR_GOODS_OPTN_INNB /*일괄처리 대상 주문상품옵션고유번호*/
|
||||||
|
, GOIO.ORDR_DLVY_INNB
|
||||||
|
, GS.SUBSVC_NM
|
||||||
|
, GS.SUBSVC_GNR
|
||||||
|
, GS.SUBSVC_GNR_NM
|
||||||
|
, GM.MBR_NM /*회원명*/
|
||||||
|
, GM.MBR_ID /*회원ID*/
|
||||||
|
, GM.MBR_DV_CD /*회원구분코드*/
|
||||||
|
, GM.MBR_INNB /*회원고유번호*/
|
||||||
|
, fn_get_member_grad_name(GO.SOPMAL_CD, GM.MBR_DV_CD, GM.MBR_INNB) AS GRADE /*회원등급*/
|
||||||
|
, MAX(GOIO.UPDT_DT) OVER(PARTITION BY GO.ORDR_INNB) AS LAST_PRCS_DT/*최종처리일*/
|
||||||
|
, GOIO.ORDR_STTUS_CD
|
||||||
|
, GOI.GOODS_IMG_COURS /*상품이미지*/
|
||||||
|
, GOI.GOODS_NM /*상품명*/
|
||||||
|
, GOIO.OPTN_NM_1 /*상품옵션명*/
|
||||||
|
, GOIO.OPTN_VAL_1 /*상품옵션값*/
|
||||||
|
, GOIO.UPDT_DT /*처리일자*/
|
||||||
|
FROM GC_ORDER GO
|
||||||
|
JOIN GC_SUBSVC GS ON GS.SOPMAL_CD = GO.SOPMAL_CD AND GS.SUBSVC_INNB = GO.SUBSVC_INNB
|
||||||
|
JOIN GC_MEMBER GM ON GM.MBR_DV_CD = GO.MBR_DV_CD AND GM.MBR_INNB = GO.MBR_INNB
|
||||||
|
JOIN GC_ORDER_ITEM GOI ON GO.SOPMAL_CD =GOI.SOPMAL_CD AND GO.ORDR_INNB = GOI.ORDR_INNB
|
||||||
|
JOIN GC_ORDER_ITEM_OPTION GOIO ON GOI.SOPMAL_CD = GOIO.SOPMAL_CD AND GOI.ORDR_GOODS_INNB = GOIO.ORDR_GOODS_INNB AND GOIO.OPTN_TY = '01'
|
||||||
|
WHERE GO.USE_AT = 'Y'
|
||||||
|
AND GO.SUBSVC_AT = 'Y'
|
||||||
|
AND GO.SOPMAL_CD = #{sopmalCd}
|
||||||
|
<if test='srchSelSubsvcNm != null and srchSelSubsvcNm != ""'>
|
||||||
|
AND GS.SUBSVC_NM = #{srchSelSubsvcNm} /*구독서비스 명*/
|
||||||
|
</if>
|
||||||
|
<if test='srchSelSubsvcGnr != null and srchSelSubsvcGnr != ""'>
|
||||||
|
AND GS.SUBSVC_GNR = #{srchSelSubsvcGnr} /*기수*/
|
||||||
|
</if>
|
||||||
|
<if test='srchSubsvcNm != null and srchSubsvcNm != ""'>
|
||||||
|
AND GS.SUBSVC_NM LIKE CONCAT('%',#{srchSubsvcNm},'%') /*구독서비스 명*/
|
||||||
|
</if>
|
||||||
|
<if test='srchSubsvcGnrNm != null and srchSubsvcGnrNm != ""'>
|
||||||
|
AND GS.SUBSVC_GNR_NM LIKE CONCAT('%',#{srchSubsvcGnrNm},'%') /*기수명*/
|
||||||
|
</if>
|
||||||
|
<if test='srchOrdrInnb != null and srchOrdrInnb != ""'>
|
||||||
|
AND GO.ORDR_INNB = #{srchOrdrInnb} /*주문번호*/
|
||||||
|
</if>
|
||||||
|
<if test='srchMbrNm != null and srchMbrNm != ""'>
|
||||||
|
AND GM.MBR_NM LIKE CONCAT('%',#{srchMbrNm},'%') /*주문자명*/
|
||||||
|
</if>
|
||||||
|
<if test='srchMbrId != null and srchMbrId != ""'>
|
||||||
|
AND GM.MBR_ID LIKE CONCAT('%',#{srchMbrId},'%') /*주문자id*/
|
||||||
|
</if>
|
||||||
|
) MAIN
|
||||||
|
WHERE (@ROWNUM:=0)=0
|
||||||
|
AND MAIN.ORDR_STTUS_CD = '35'
|
||||||
|
<if test='srchCurMonExclude!= null and srchCurMonExclude == "Y"'>
|
||||||
|
<![CDATA[
|
||||||
|
AND MAIN.LAST_PRCS_DT < CONCAT(DATE_FORMAT(NOW(),'%Y-%m'),'-01') /*당월 처리자 제외*/
|
||||||
|
]]>
|
||||||
|
</if>
|
||||||
|
<choose>
|
||||||
|
<when test='sortDv == "subsvcGnrAsc"'>
|
||||||
|
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC /*구독서비스명+기수*/
|
||||||
|
</when>
|
||||||
|
<when test='sortDv == "subsvcGnrDesc"'>
|
||||||
|
ORDER BY SUBSVC_NM DESC, SUBSVC_GNR DESC /*구독서비스명+기수*/
|
||||||
|
</when>
|
||||||
|
<when test='sortDv == "mbrAsc"'>
|
||||||
|
ORDER BY MBR_NM ASC, MBR_ID ASC /*주문자순*/
|
||||||
|
</when>
|
||||||
|
<when test='sortDv == "mbrDesc"'>
|
||||||
|
ORDER BY MBR_NM DESC, MBR_ID DESC /*주문자순*/
|
||||||
|
</when>
|
||||||
|
<when test='sortDv == "ordrAsc"'>
|
||||||
|
ORDER BY ORDR_INNB ASC /*주문번호순*/
|
||||||
|
</when>
|
||||||
|
<when test='sortDv == "ordrDesc"'>
|
||||||
|
ORDER BY ORDR_INNB DESC /*주문번호순*/
|
||||||
|
</when>
|
||||||
|
<when test='sortDv == "lastPrcsDtAsc"'>
|
||||||
|
ORDER BY UPDT_DT ASC /*처리일순*/
|
||||||
|
</when>
|
||||||
|
<when test='sortDv == "lastPrcsDtDesc"'>
|
||||||
|
ORDER BY UPDT_DT ASC /*처리일순*/
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
ORDER BY SUBSVC_NM ASC, SUBSVC_GNR ASC
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
) PV
|
||||||
|
WHERE 1=1
|
||||||
|
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="select-box">
|
<div class="select-box">
|
||||||
<select title="정렬순" name="sortDvView" id="sortDvView" onchange="fn_select_list(1);return false;">
|
<select title="정렬순서" name="sortDvView" id="sortDvView" onchange="fn_select_list(1);return false;">
|
||||||
<option value="subsvcGnrAsc" <c:if test="${resultMap.paramVO.sortDv eq 'subsvcGnrAsc'}">selected="selected"</c:if>>구독서비스+기수 오름차순</option>
|
<option value="subsvcGnrAsc" <c:if test="${resultMap.paramVO.sortDv eq 'subsvcGnrAsc'}">selected="selected"</c:if>>구독서비스+기수 오름차순</option>
|
||||||
<option value="subsvcGnrDesc" <c:if test="${resultMap.paramVO.sortDv eq 'subsvcGnrDesc'}">selected="selected"</c:if>>구독서비스+기수 내림차순</option>
|
<option value="subsvcGnrDesc" <c:if test="${resultMap.paramVO.sortDv eq 'subsvcGnrDesc'}">selected="selected"</c:if>>구독서비스+기수 내림차순</option>
|
||||||
<option value="mbrAsc" <c:if test="${resultMap.paramVO.sortDv eq 'mbrAsc'}">selected="selected"</c:if>>주문자 오름차순</option>
|
<option value="mbrAsc" <c:if test="${resultMap.paramVO.sortDv eq 'mbrAsc'}">selected="selected"</c:if>>주문자 오름차순</option>
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
<td><c:out value="${subsvcOrdr.subsvcGnrNm}"/></td>
|
<td><c:out value="${subsvcOrdr.subsvcGnrNm}"/></td>
|
||||||
<td><c:out value="${subsvcOrdr.mbrNm}"/></br>(<c:out value="${subsvcOrdr.mbrId}"/>/<c:out value="${subsvcOrdr.grade}"/>)</td>
|
<td><c:out value="${subsvcOrdr.mbrNm}"/></br>(<c:out value="${subsvcOrdr.mbrId}"/>/<c:out value="${subsvcOrdr.grade}"/>)</td>
|
||||||
<td><c:out value="${subsvcOrdr.ordrInnb}"/></td>
|
<td><c:out value="${subsvcOrdr.ordrInnb}"/></td>
|
||||||
<td><c:out value="${subsvcOrdr.curtProcsOdr}"/></td>
|
<td><c:out value="${subsvcOrdr.curtProcsOdr}"/>회</td>
|
||||||
<td><c:out value="${subsvcOrdr.mbrLastProcsOdr}"/>회 <button class="btn xsm outline light-gray" type="button" onclick="fn_open_modal('#modalDiv','#subsvcOrdrDlvyListPop','<c:url value ='/mngr/ordr/subsvc/selectSubsvcOrdrDlvyListPop'/>',{'ordrInnb':'<c:out value="${subsvcOrdr.ordrInnb}"/>'}); return false;">배송내역</button></td>
|
<td><c:out value="${subsvcOrdr.mbrLastProcsOdr}"/>회 <button class="btn xsm outline light-gray" type="button" onclick="fn_open_modal('#modalDiv','#subsvcOrdrDlvyListPop','<c:url value ='/mngr/ordr/subsvc/selectSubsvcOrdrDlvyListPop'/>',{'ordrInnb':'<c:out value="${subsvcOrdr.ordrInnb}"/>'}); return false;">배송내역</button></td>
|
||||||
<fmt:parseDate value="${subsvcOrdr.lastPrcsDt}" pattern="yyyy-MM-dd HH:mm:ss" var="parseLastPrcsDt"/>
|
<fmt:parseDate value="${subsvcOrdr.lastPrcsDt}" pattern="yyyy-MM-dd HH:mm:ss" var="parseLastPrcsDt"/>
|
||||||
<fmt:formatDate value="${parseLastPrcsDt }" var="formatLastPrcsDt" pattern="yyyy-MM-dd"/>
|
<fmt:formatDate value="${parseLastPrcsDt }" var="formatLastPrcsDt" pattern="yyyy-MM-dd"/>
|
||||||
|
|||||||
@@ -0,0 +1,140 @@
|
|||||||
|
<%@ 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 : SubsvcOrdrMappedList.jsp
|
||||||
|
Description : 구독서비스 상품변경 목록
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2026-02-09 jazz 최초 생성
|
||||||
|
--%>
|
||||||
|
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||||
|
<section class="content-section">
|
||||||
|
<div class="form-control-container">
|
||||||
|
<div class="left">
|
||||||
|
<div class="search-number">
|
||||||
|
<span class="search-number__text">총 <strong><c:out value="${ resultMap.paginationInfo.totalRecordCount }"/></strong>건</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="center">
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div class="select-box">
|
||||||
|
<select title="정렬순서" name="sortDvView" id="sortDvView" onchange="fn_select_list(1);return false;">
|
||||||
|
<option value="subsvcGnrAsc" <c:if test="${resultMap.paramVO.sortDv eq 'subsvcGnrAsc'}">selected="selected"</c:if>>구독서비스+기수 오름차순</option>
|
||||||
|
<option value="subsvcGnrDesc" <c:if test="${resultMap.paramVO.sortDv eq 'subsvcGnrDesc'}">selected="selected"</c:if>>구독서비스+기수 내림차순</option>
|
||||||
|
<option value="mbrAsc" <c:if test="${resultMap.paramVO.sortDv eq 'mbrAsc'}">selected="selected"</c:if>>주문자 오름차순</option>
|
||||||
|
<option value="mbrDesc" <c:if test="${resultMap.paramVO.sortDv eq 'mbrDesc'}">selected="selected"</c:if>>주문자 내림차순</option>
|
||||||
|
<option value="ordrAsc" <c:if test="${resultMap.paramVO.sortDv eq 'ordrAsc'}">selected="selected"</c:if>>주문번호 오름차순</option>
|
||||||
|
<option value="ordrDesc" <c:if test="${resultMap.paramVO.sortDv eq 'ordrDesc'}">selected="selected"</c:if>>주문번호 내림차순</option>
|
||||||
|
<option value="lastPrcsDtAsc" <c:if test="${resultMap.paramVO.sortDv eq 'lastPrcsDtAsc'}">selected="selected"</c:if>>처리일 오름차순</option>
|
||||||
|
<option value="lastPrcsDtDesc" <c:if test="${resultMap.paramVO.sortDv eq 'lastPrcsDtDesc'}">selected="selected"</c:if>>처리일 내림차순</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="select-box">
|
||||||
|
<select id="pageUnitView" name="pageUnitView" title="페이지당 출력될 목록건수" onchange="fn_select_list(1,this.value);return false;">
|
||||||
|
<c:forEach items="${ resultMap.paginationInfo.pageUnitArr }" var="pageUnit" varStatus="pageUnitStatus">
|
||||||
|
<option value="<c:out value="${ pageUnit }"/>"
|
||||||
|
<c:if test="${ resultMap.paginationInfo.recordCountPerPage eq pageUnit}">selected="selected"</c:if>>
|
||||||
|
<c:out value="${ pageUnit }"/>개씩
|
||||||
|
</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr class="horizontal-line">
|
||||||
|
<div class="form-control-container">
|
||||||
|
<div class="left">
|
||||||
|
<button class="btn sm dark" onclick="fn_allOrdrReady_check();return false;">상품준비 일괄처리</button>
|
||||||
|
</div>
|
||||||
|
<div class="center">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr class="spacing">
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table class="table vertical">
|
||||||
|
<caption>구독서비스 목록</caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 4%;">
|
||||||
|
<col style="width: 15%;">
|
||||||
|
<col style="width: 4%;">
|
||||||
|
<col style="width: 7%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
<col style="width: 5%;">
|
||||||
|
<col style="width: 5%;">
|
||||||
|
<col style="width: 25%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<label class="b-checkbox checkbox is-medium ">
|
||||||
|
<input type="checkbox" id="checkAll" value="">
|
||||||
|
<span class="check"></span>
|
||||||
|
</label>
|
||||||
|
</th>
|
||||||
|
<th>구독서비스</th>
|
||||||
|
<th>기수</th>
|
||||||
|
<th>기수명</th>
|
||||||
|
<th>주문자</th>
|
||||||
|
<th>주문번호</th>
|
||||||
|
<th>차수</th>
|
||||||
|
<th colspan="2">상품</th>
|
||||||
|
<th>처리일</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${ not empty resultMap.list }">
|
||||||
|
<c:forEach items="${ resultMap.list }" var="subsvcOrdrMapped" varStatus="status">
|
||||||
|
<tr<c:if test="${lastProcsOdr > mbrLastProcsOdr}"> class="sendOut-info__reseller"</c:if>>
|
||||||
|
<td>
|
||||||
|
<label class="b-checkbox checkbox is-medium check-all">
|
||||||
|
<input type="checkbox" name="arrCheck" class="arrCheck" value="${subsvcOrdrMapped.ordrInnb}@${subsvcOrdrMapped.ordrGoodsInnb}@${subsvcOrdrMapped.ordrGoodsOptnInnb}@${subsvcOrdrMapped.ordrDlvyInnb}">
|
||||||
|
<span class="check"></span>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td><c:out value="${subsvcOrdrMapped.subsvcNm}"/></td>
|
||||||
|
<td><c:out value="${subsvcOrdrMapped.subsvcGnr}"/>기</td>
|
||||||
|
<td><c:out value="${subsvcOrdrMapped.subsvcGnrNm}"/></td>
|
||||||
|
<td><c:out value="${subsvcOrdrMapped.mbrNm}"/></br>(<c:out value="${subsvcOrdrMapped.mbrId}"/>/<c:out value="${subsvcOrdrMapped.grade}"/>)</td>
|
||||||
|
<td><c:out value="${subsvcOrdrMapped.ordrInnb}"/></td>
|
||||||
|
<td><c:out value="${subsvcOrdrMapped.curtProcsOdr}"/>회</td>
|
||||||
|
<td><img src='<c:out value="${cdnurl}${subsvcOrdrMapped.goodsImgCours}"/>' onerror="this.src='/pc/images/image_placeholder.png'" alt='<c:out value="${subsvcOrdrMapped.goodsNm}"/>' width="56px" height="56px"></td>
|
||||||
|
<td>
|
||||||
|
<div class="order-section__product-info">
|
||||||
|
<span class="order-section__product-productTitle"><c:out value="${subsvcOrdrMapped.goodsNm}"/></span>
|
||||||
|
<span class="option-text">
|
||||||
|
<span class="option-badge">옵션</span> <c:out value="${subsvcOrdrMapped.optnNm1}"/>:<c:out value="${subsvcOrdrMapped.optnVal1}"/>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<fmt:parseDate value="${subsvcOrdrMapped.updtDt}" pattern="yyyy-MM-dd HH:mm:ss" var="parseUpdtDt"/>
|
||||||
|
<fmt:formatDate value="${parseUpdtDt }" var="formatUpdtDt" pattern="yyyy-MM-dd"/>
|
||||||
|
<td><c:out value="${ formatUpdtDt }"/></td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<tr>
|
||||||
|
<td colspan="100%"><spring:message code="common.nodata"/></td>
|
||||||
|
</tr>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="pagination__container">
|
||||||
|
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_list"/>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,504 @@
|
|||||||
|
<%@ 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 : SubsvcOrdrMappedListFrom.jsp
|
||||||
|
Description : 구독서비스 상품변경 목록 조회 폼
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2026-02-09 jazz 최초 생성
|
||||||
|
--%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>일반 관리자</title>
|
||||||
|
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||||
|
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
|
||||||
|
</head>
|
||||||
|
<script>
|
||||||
|
var initFlag = true;
|
||||||
|
$(document).ready(function () {
|
||||||
|
let pageIndex = $("#pageIndex").val();
|
||||||
|
let pageUnit = $("#pageUnit").val();
|
||||||
|
let srchSelSubsvcNm = $('#srchSelSubsvcNm').val();
|
||||||
|
// event 제어
|
||||||
|
fn_event();
|
||||||
|
|
||||||
|
if(srchSelSubsvcNm != ''){
|
||||||
|
fn_getsubsvcGnr(srchSelSubsvcNm);
|
||||||
|
}else{
|
||||||
|
// 목록 조회
|
||||||
|
fn_select_list(pageIndex, pageUnit);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 엔터키 검색
|
||||||
|
$('#listForm').on('keydown', function (event) {
|
||||||
|
if (event.keyCode === 13) {
|
||||||
|
event.preventDefault();
|
||||||
|
fn_select_list(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
/*********************************************************
|
||||||
|
* 목록 조회
|
||||||
|
******************************************************** */
|
||||||
|
const fn_select_list = function (pageIndex, pageUnit) {
|
||||||
|
let dataStr;
|
||||||
|
|
||||||
|
if (!pageIndex) {
|
||||||
|
$('#pageIndex').val(1);
|
||||||
|
} else {
|
||||||
|
$('#pageIndex').val(pageIndex);
|
||||||
|
}
|
||||||
|
//정렬기준 셋팅
|
||||||
|
if(typeof $('#sortDvView') !== undefined && $('#sortDvView').val() !== undefined){
|
||||||
|
$('#sortDv').val($('#sortDvView').val());
|
||||||
|
}
|
||||||
|
//한페이지 목록개수 셋팅
|
||||||
|
if(typeof $('#pageUnitView') !== undefined && $('#pageUnitView').val() !== undefined){
|
||||||
|
$('#pageUnit').val($('#pageUnitView').val());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pageUnit) {
|
||||||
|
dataStr = $('#listForm').serialize();
|
||||||
|
} else {
|
||||||
|
if ($('#pageUnit').length) {
|
||||||
|
$('#pageUnit').val(pageUnit);
|
||||||
|
dataStr = $('#listForm').serialize();
|
||||||
|
} else {
|
||||||
|
dataStr = $('#listForm').serialize() + '&pageUnit=' + pageUnit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "<c:url value="/mngr/ordr/subsvc/selectSubsvcOrdrMappedList"/>",
|
||||||
|
data: dataStr,
|
||||||
|
success: function (resultHtml) {
|
||||||
|
$('#pageDiv').html(resultHtml);
|
||||||
|
$('#sortDv').val($('#sortDvView').val());
|
||||||
|
$('#pageUnitView').niceSelect();
|
||||||
|
$('#sortDvView').niceSelect();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 현제uri에 프로토콜, 호스트, 쿼리스티링을 제외하여 history갱신 */
|
||||||
|
history.replaceState({}, null, location.pathname);
|
||||||
|
|
||||||
|
/* ****************************
|
||||||
|
* event 제어
|
||||||
|
******************************/
|
||||||
|
const fn_event = function () {
|
||||||
|
/* 검색조건 구독서비스 선택 시 회차 조회 이벤트*/
|
||||||
|
$(document).on('change', '#srchSelSubsvcNm', function(){
|
||||||
|
var srchSelSubsvcNm = $(this).val();
|
||||||
|
if(fn_is_empty(srchSelSubsvcNm)){
|
||||||
|
// 회차 초기화
|
||||||
|
$('#srchSelSubsvcGnr').empty().append('<option value="">전체</option>').niceSelect('update');
|
||||||
|
}else{
|
||||||
|
//해당구독서비스 기수조회
|
||||||
|
fn_getsubsvcGnr(srchSelSubsvcNm);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/* 목록 > 전체선택 체인지 이벤트 */
|
||||||
|
$(document).on('change', '#checkAll', function () {
|
||||||
|
let checkbox = $(this).closest('table').find('input[name="arrCheck"]');
|
||||||
|
|
||||||
|
$(checkbox).prop('checked', false);
|
||||||
|
$(checkbox).prop('checked', $(this).is(':checked'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ****************************
|
||||||
|
* 해당구독서비스 기수조회 AJAX
|
||||||
|
******************************/
|
||||||
|
const fn_getsubsvcGnr = function (srchSelSubsvcNm) {
|
||||||
|
$.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: '<c:url value="/mngr/goods/subsvc/selectSrchSubsvcGnrListAjax"/>',
|
||||||
|
data: {
|
||||||
|
'srchSelSubsvcNm': srchSelSubsvcNm
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
if (data.resBody != null) {
|
||||||
|
const result = JSON.parse(data.resBody.result);
|
||||||
|
const srchSubsvcGnrList = result.srchSubsvcGnrList;
|
||||||
|
if (srchSubsvcGnrList.length > 0) {
|
||||||
|
// 회차 초기화
|
||||||
|
$('#srchSelSubsvcGnr').empty().append('<option value="">전체</option>').niceSelect('update');
|
||||||
|
// $('#srchSubsvcGnr option').filter(function() {
|
||||||
|
// return $(this).val() !== '';
|
||||||
|
// }).remove();
|
||||||
|
|
||||||
|
for (let i = 0; i < srchSubsvcGnrList.length; i++) {
|
||||||
|
const srchSubsvcGnr = srchSubsvcGnrList[i];
|
||||||
|
var check = "";
|
||||||
|
if(srchSubsvcGnr.subsvcGnr == '${resultMap.paramVO.srchSelSubsvcGnr}'){
|
||||||
|
check ="selected"
|
||||||
|
}
|
||||||
|
|
||||||
|
if(initFlag == true){
|
||||||
|
$('#srchSelSubsvcGnr').append('<option value="' + srchSubsvcGnr.subsvcGnr + '" '+ check+'>' + srchSubsvcGnr.subsvcGnrNm + '</option>');
|
||||||
|
fn_select_list();
|
||||||
|
initFlag = false;
|
||||||
|
}else{
|
||||||
|
$('#srchSelSubsvcGnr').append('<option value="' + srchSubsvcGnr.subsvcGnr + '">' + srchSubsvcGnr.subsvcGnrNm + '</option>');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$('#srchSelSubsvcGnr').niceSelect('update');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (data) {
|
||||||
|
fn_proc_error_message(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 체크박스 전체 처리
|
||||||
|
* */
|
||||||
|
const fn_change_event = function (_target, _arg) {
|
||||||
|
if (_arg === 'all') {
|
||||||
|
|
||||||
|
if ($('#' + _target + '-all').is(':checked')) {
|
||||||
|
$('[name=' + _target + ']').prop('checked', true);
|
||||||
|
} else {
|
||||||
|
$('[name=' + _target + ']').prop('checked', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
let chkCnt = $('[name=' + _target + ']:checked').length;
|
||||||
|
let allCnt = $('[name=' + _target + ']').length;
|
||||||
|
if (chkCnt !== allCnt && $('#' + _target + '-all').is(':checked')) {
|
||||||
|
$('#' + _target + '-all').prop('checked', false);
|
||||||
|
} else if (chkCnt === allCnt) {
|
||||||
|
$('#' + _target + '-all').prop('checked', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************************
|
||||||
|
* 선택된 대상자 구독서비스 상품준비 일괄처리 AJAX
|
||||||
|
*********************************************************/
|
||||||
|
const fn_allOrdrReady_check = function () {
|
||||||
|
|
||||||
|
let url = '<c:url value="/mngr/ordr/subsvc/updateSubsvcOrdrReady"/>';
|
||||||
|
let check = $("input[name='arrCheck']:checked");
|
||||||
|
let param = $('#listForm').serialize();
|
||||||
|
|
||||||
|
if (check.length === 0) {
|
||||||
|
alert("선택된 대상이 없습니다");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 출고상품 선택 확인*/
|
||||||
|
if($('#goodsInnb').val() == undefined){
|
||||||
|
alert("출고상품 선택이 필요합니다");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (confirm('선택된 주문을 상품준비 일괄처리 하시겠습니까?')) {
|
||||||
|
$.ajax({
|
||||||
|
type: 'post',
|
||||||
|
url: url,
|
||||||
|
data: param,
|
||||||
|
dataType: "json",
|
||||||
|
success: function (data) {
|
||||||
|
const message = JSON.parse(data.resBody.result).message;
|
||||||
|
if(message == "success"){
|
||||||
|
alert('<spring:message code="success.common.process"/>');
|
||||||
|
fn_select_list();
|
||||||
|
}else{
|
||||||
|
alert('<spring:message code="fail.common.save"/>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 관리자 주문 > 상품조회 > 검색조건 > 날짜 선택 이벤트 */
|
||||||
|
$(document).on('click', '.dateRange-btn', function () {
|
||||||
|
const date = $(this).attr('id');
|
||||||
|
|
||||||
|
$('.dateRange-btn').removeClass('selected');
|
||||||
|
$('#' + date).addClass('selected');
|
||||||
|
|
||||||
|
const datepicker = $(this).closest('.td-inner').find('.datepicker');
|
||||||
|
const start = $(datepicker[0]).attr('id');
|
||||||
|
const end = $(datepicker[1]).attr('id');
|
||||||
|
|
||||||
|
if ('allDays' === date) {
|
||||||
|
$('#' + start + ', #' + end).val('');
|
||||||
|
|
||||||
|
$('#datePeriod').val(date);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn_set_date(start, end, end, date);
|
||||||
|
|
||||||
|
$('#datePeriod').val(date);
|
||||||
|
});
|
||||||
|
|
||||||
|
//카테고리 선택시 카테고리 아이디 저장(검색용)
|
||||||
|
$(document).on('change', 'select[id^=ctgryDepth]', function () {
|
||||||
|
const ctgryOptn = $(this).val()
|
||||||
|
|
||||||
|
if(!fn_is_empty(ctgryOptn)){
|
||||||
|
$('#ctgryId').val(ctgryOptn)
|
||||||
|
}else{
|
||||||
|
//value가 ''인 카테고리 선택할경우
|
||||||
|
let currentCtgryDepth = parseInt($(this).attr('id').replace('ctgryDepth', ''));
|
||||||
|
|
||||||
|
//1차 카테고리가 아닐 경우 이전 카테고리 번호 가져오기
|
||||||
|
if(currentCtgryDepth !== 1){
|
||||||
|
$('#ctgryId').val($('#ctgryDepth' + (currentCtgryDepth - 1)).val())
|
||||||
|
}else{
|
||||||
|
//1차 카테고리 일경우 카테고리 번호 비우기
|
||||||
|
$('#ctgryId').val('')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
//초기화버튼
|
||||||
|
$(document).on('click', '#resetBtn', function () {
|
||||||
|
$('#listForm')[0].reset();
|
||||||
|
$('#srchSelSubsvcNm').niceSelect('update');
|
||||||
|
$('#srchSelSubsvcNm').trigger("change");
|
||||||
|
$('#srchSelSubsvcGnr').niceSelect('update');
|
||||||
|
|
||||||
|
fn_select_list(1);
|
||||||
|
})
|
||||||
|
|
||||||
|
let selected = [];
|
||||||
|
|
||||||
|
/*********************************************************
|
||||||
|
* 상품 검색 팝업 > 상품 목록 조회
|
||||||
|
* param : pageIndex, selected
|
||||||
|
******************************************************** */
|
||||||
|
const fn_goods_search_popup_list = function (pageIndex, selected) {
|
||||||
|
let dataStr;
|
||||||
|
if (!pageIndex) {
|
||||||
|
$('#pageIndex').val(1);
|
||||||
|
} else {
|
||||||
|
$('#pageIndex').val(pageIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#popupListForm').find('input[name=pageIndex]').eq(0).val(pageIndex);
|
||||||
|
const popupListForm = $("#popupListForm").serialize();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "<c:url value="/mngr/goods/goodsmngr/selectGoodsSrchPopupList"/>",
|
||||||
|
data: popupListForm,
|
||||||
|
success: function (resultHtml) {
|
||||||
|
$('#goodsList').empty();
|
||||||
|
$('#goodsList').html(resultHtml);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************************
|
||||||
|
* 상품검색 팝업에서 선택된 상품을 출고상품에 셋팅
|
||||||
|
* param 없음
|
||||||
|
******************************************************** */
|
||||||
|
function fn_select_goods_search() {
|
||||||
|
let selected = [];
|
||||||
|
$('#appendList tr').each(function () {
|
||||||
|
const goodsId = $(this).attr('id').replace('choiseListId', '');
|
||||||
|
const goodsOptnInnb = $(this).find('input[name="goodsOptnInnb"]').val();
|
||||||
|
const optnTy = $(this).find('input[name="optnTy"]').val();
|
||||||
|
const goodsImg = $(this).find('input[name="goodsImgCours"]').val();
|
||||||
|
const goodsNm = $(this).find('input[name="goodsNm"]').val();
|
||||||
|
const goodsPrice = $(this).find('input[name="slepric"]').val();
|
||||||
|
const goodsSttusNm = $(this).find('input[name="goodsSttusNm"]').val();
|
||||||
|
const expsrNm = $(this).find('input[name="expsrNm"]').val();
|
||||||
|
|
||||||
|
selected.push({
|
||||||
|
goodsId: goodsId,
|
||||||
|
goodsOptnInnb: goodsOptnInnb,
|
||||||
|
optnTy: optnTy,
|
||||||
|
goodsImg: goodsImg,
|
||||||
|
goodsNm: goodsNm,
|
||||||
|
goodsPrice: goodsPrice,
|
||||||
|
goodsSttusNm: goodsSttusNm,
|
||||||
|
expsrNm: expsrNm
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 각 화면에 맞춰서 HTML 변경 START
|
||||||
|
var tableBody = $("#parentGoodsContainer");
|
||||||
|
tableBody.empty();
|
||||||
|
|
||||||
|
selected.forEach((good, index) => {
|
||||||
|
if(index == 0) {
|
||||||
|
var productHtml = `
|
||||||
|
<div class="product-group__item">
|
||||||
|
<input type="hidden" id="goodsInnb" name="goodsInnb" value="` + good.goodsId + `">
|
||||||
|
<input type="hidden" id="goodsOptnInnb" name="goodsOptnInnb" value="` + good.goodsOptnInnb + `">
|
||||||
|
<input type="hidden" id="optnTy" name="optnTy" value="` + good.optnTy + `">
|
||||||
|
<span class="product-group__item-number">` + (index + 1) + `</span>
|
||||||
|
<div class="product-group__image">
|
||||||
|
<img src="` + good.goodsImg + `" width="140" alt="` + good.goodsNm + `"
|
||||||
|
onerror="this.src='/mngr/images/image_placeholder.png'"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="product-group__description">
|
||||||
|
<p>` + good.goodsNm + `</p>
|
||||||
|
<p class="product-group__description-price">` + fn_format_comma(good.goodsPrice) + `${curUnit}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
tableBody.append(productHtml);
|
||||||
|
});
|
||||||
|
// 각 화면에 맞춰서 HTML 변경 END
|
||||||
|
|
||||||
|
fn_close_modal('product-search');
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<body>
|
||||||
|
<%@ include file="/WEB-INF/views/comm/mngr/Header.jsp"%>
|
||||||
|
<main class="main">
|
||||||
|
<%@ include file="/WEB-INF/views/comm/mngr/Left.jsp"%>
|
||||||
|
<div class="content">
|
||||||
|
<div class="content__inner">
|
||||||
|
<button class="side-nav__fold"><span class="visually-hidden">좌측메뉴 펼치기/닫기</span></button>
|
||||||
|
<div class="page-title">
|
||||||
|
<h2 class="page-title__title">구독서비스 상품변경 관리</h2>
|
||||||
|
<div class="page-title__btn-container">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<form id='listForm' name="listForm" method="post" action="<c:url value="/mngr/ordr/subsvc/selectSubsvcOrdrMappedList"/>">
|
||||||
|
<input type="hidden" id="pageIndex" name="pageIndex" value="${ resultMap.paramVO.pageIndex }"/>
|
||||||
|
<input type="hidden" id="sortDv" name="sortDv" value="${ resultMap.paramVO.sortDv }">
|
||||||
|
<input type="hidden" id="pageUnit" name="pageUnit" value="${ resultMap.paramVO.pageUnit }">
|
||||||
|
<input type="hidden" id="subsvcInnb" name="subsvcInnb" value="">
|
||||||
|
<section class="content-section" id="search-section">
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table class="table">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 12%;">
|
||||||
|
<col>
|
||||||
|
<col style="width: 12%;">
|
||||||
|
<col>
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
<th>구독서비스</th>
|
||||||
|
<td colspan="3">
|
||||||
|
<div class="td-inner">
|
||||||
|
<div class="select-box">
|
||||||
|
<select title="구독서비스" id="srchSelSubsvcNm" name="srchSelSubsvcNm">
|
||||||
|
<option value="" <c:if test="${ resultMap.paramVO.srchSelSubsvcNm eq ''}">selected="selected"</c:if>>전체</option>
|
||||||
|
<c:forEach items="${resultMap.srchSubsvcList}" var="srchSubsvc" varStatus="status">
|
||||||
|
<option value="${srchSubsvc.subsvcNm}" <c:if test="${ resultMap.paramVO.srchSelSubsvcNm eq srchSubsvc.subsvcNm}">selected="selected"</c:if>>${srchSubsvc.subsvcNm}</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="select-box">
|
||||||
|
<select title="구독서비스회차" id="srchSelSubsvcGnr" name="srchSelSubsvcGnr">
|
||||||
|
<option value="" <c:if test="${ resultMap.paramVO.srchSelSubsvcGnr eq ''}">selected="selected"</c:if>>전체</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>구독서비스명</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<input class="input-text xl" type="text" title="구독서비스명" id="srchSubsvcNm" name="srchSubsvcNm" value="<c:out value="${ resultMap.paramVO.srchSubsvcNm }" />">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<th>기수명</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<input class="input-text xl" type="text" title="구독서비스명" id="srchSubsvcGnrNm" name="srchSubsvcGnrNm" value="<c:out value="${ resultMap.paramVO.srchSubsvcGnrNm }" />">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>주문자명</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<input class="input-text xl" type="text" title="주문자명" id="srchMbrNm" name="srchMbrNm" value="<c:out value="${ resultMap.paramVO.srchMbrNm }" />">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<th>주문자ID</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<input class="input-text xl" type="text" title="주문자ID" id="srchMbrId" name="srchMbrId" value="<c:out value="${ resultMap.paramVO.srchMbrId }" />">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>주문번호</th>
|
||||||
|
<td colspan="3">
|
||||||
|
<div class="td-inner">
|
||||||
|
<input class="input-text xl" type="text" title="주문번호" id="srchOrdrInnb" name="srchOrdrInnb" value="<c:out value="${ resultMap.paramVO.srchOrdrInnb }" />">
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="form-control-container">
|
||||||
|
<div class="left"></div>
|
||||||
|
<div class="center">
|
||||||
|
<button class="btn outline" id="resetBtn" type="button">초기화</button>
|
||||||
|
<button class="btn primary" id="searchBtn" type="button" onclick="fn_select_list(1);"><spring:message code="button.search"/> </button>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="" >
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table class="table">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 12%;">
|
||||||
|
<col>
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
<th>출고상품<span class="red-7">*</span>
|
||||||
|
<a type="button" onclick="fn_open_modal('#modalDiv','#product-search','/mngr/goods/goodsmngr/selectGoodsSrchPopupForm',{'goodsKndCd':'01'}); return false;" class="btn xsm primary mt-5">검색</a>
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<div id="parentGoodsContainer" class="product-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<div id="pageDiv">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="modalDiv">asfasdfasdaf</div>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user