fix : 관리자 구독서비스 상품준비 관리
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ page import="java.util.Date" %>
|
||||
<%@ 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 : subsvcOrdrDlvyListPop.jsp
|
||||
Description : 구독서비스 상품준비 관리 배송내역 팝업
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2026-02-07 jazz 최초 생성
|
||||
--%>
|
||||
<spring:eval expression="@environment.getProperty('mngrfo.common.fileupload.cdnurl')" var="cdnurl"/>
|
||||
<div id="subsvcOrdrDlvyListPop" class="modal" style="max-width: 1000px;">
|
||||
<div class="modal-header">
|
||||
<h4>배송내역</h4>
|
||||
</div>
|
||||
<br>
|
||||
<div class="modal-content">
|
||||
<div class="form-control-container mb-10">
|
||||
<div class="left">
|
||||
</div>
|
||||
<div class="center">
|
||||
</div>
|
||||
<div class="right">
|
||||
</div>
|
||||
</div>
|
||||
<div class=" table-wrapper mb-40">
|
||||
<table class="table">
|
||||
<caption>주문자/주문번호 정보</caption>
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 35%;">
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>주문자</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:if test="${not empty resultMap.list}">
|
||||
${resultMap.list[0].mbrNm} (${resultMap.list[0].mbrId}/${resultMap.list[0].grade})
|
||||
</c:if>
|
||||
</div>
|
||||
</td>
|
||||
<th>주문번호</th>
|
||||
<td>
|
||||
<div class="td-inner">
|
||||
<c:if test="${not empty resultMap.list}">${resultMap.list[0].ordrInnb}</c:if>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
<div class=" table-wrapper mb-40">
|
||||
<table class="table vertical" style="max-height: 200px;">
|
||||
<caption>배송정보</caption>
|
||||
<colgroup>
|
||||
<col style="width: 5%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 35%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 10%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>차수</th>
|
||||
<th>발생일자</th>
|
||||
<th colspan="2">상품명</th>
|
||||
<th>정가</th>
|
||||
<th>판매가</th>
|
||||
<th>상태</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.list }">
|
||||
<c:forEach items="${ resultMap.list }" var="dlvy" varStatus="status">
|
||||
<tr>
|
||||
<td><c:out value="${dlvy.rnum}"/></td>
|
||||
<fmt:parseDate value="${dlvy.procsDt}" pattern="yyyy-MM-dd HH:mm:ss" var="parsePrcsDt"/>
|
||||
<fmt:formatDate value="${parsePrcsDt }" var="formatPrcsDt" pattern="yyyy-MM-dd"/>
|
||||
<td><c:out value="${formatPrcsDt}"/></td>
|
||||
<td><img src='<c:out value="${cdnurl}${dlvy.goodsImgCours}"/>' onerror="this.src='/pc/images/image_placeholder.png'" alt='<c:out value="${dlvy.goodsNm}"/>' width="56px" height="56px"></td>
|
||||
<td>
|
||||
<div class="order-section__product-info">
|
||||
<span class="order-section__product-productTitle"><c:out value="${dlvy.goodsNm}"/></span>
|
||||
<span class="option-text">
|
||||
<span class="option-badge">옵션</span> <c:out value="${dlvy.optnNm1}"/>:<c:out value="${dlvy.optnVal1}"/>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td><fmt:formatNumber value="${dlvy.cnsmrpric}" pattern="#,###"/></td>
|
||||
<td><fmt:formatNumber value="${dlvy.slepric}" pattern="#,###"/></td>
|
||||
<td><c:out value="${dlvy.ordrSttus}"/></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>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" id="btn_close_modal_bbsC" rel="modal:close" class="btn outline">닫기</a>
|
||||
</div>
|
||||
<a href="#close-modal" rel="modal:close" class="close-modal ">Close</a>
|
||||
</div>
|
||||
<script src="/mngr/js/script.js" defer=""></script>
|
||||
@@ -0,0 +1,130 @@
|
||||
<%@ 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 : SubsvcOrdrList.jsp
|
||||
Description : 구독서비스 상품준비 목록
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2026-02-05 jazz 최초 생성
|
||||
--%>
|
||||
<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: 20%;">
|
||||
<col style="width: 6%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 15%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 10%;">
|
||||
<col style="width: 10%;">
|
||||
<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>최종 차수</th>
|
||||
<th>최종 처리일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:choose>
|
||||
<c:when test="${ not empty resultMap.list }">
|
||||
<c:forEach items="${ resultMap.list }" var="subsvcOrdr" 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="${subsvcOrdr.ordrInnb}@${subsvcOrdr.ordrGoodsInnb}@${subsvcOrdr.ordrGoodsOptnInnb}@${subsvcOrdr.ordrDlvyInnb}">
|
||||
<span class="check"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td><c:out value="${subsvcOrdr.subsvcNm}"/></td>
|
||||
<td><c:out value="${subsvcOrdr.subsvcGnr}"/>기</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.ordrInnb}"/></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>
|
||||
<fmt:parseDate value="${subsvcOrdr.lastPrcsDt}" pattern="yyyy-MM-dd HH:mm:ss" var="parseLastPrcsDt"/>
|
||||
<fmt:formatDate value="${parseLastPrcsDt }" var="formatLastPrcsDt" pattern="yyyy-MM-dd"/>
|
||||
<td><c:out value="${ formatLastPrcsDt }"/></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,513 @@
|
||||
<%@ 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 : SubsvcOrdrListFrom.jsp
|
||||
Description : 구독서비스 상품준비 목록 조회 폼
|
||||
Modification Information
|
||||
|
||||
수정일 수정자 수정내용
|
||||
------- -------- ---------------------------
|
||||
2026-02-05 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/selectSubsvcOrdrList"/>",
|
||||
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');
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
* 배송내역 팝업
|
||||
*********************************************************/
|
||||
const fn_select_dlvy_pop = function (ordrInnb) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: "<c:url value ='/mngr/ordr/subsvc/selectSubsvcOrdrDlvyListPop'/>",
|
||||
data: {ordrInnb: ordrInnb},
|
||||
success: function (data) {
|
||||
alert(data);
|
||||
$("#modalDiv").empty();
|
||||
$("#modalDiv").html(data);
|
||||
$("#board-list-registration").modal();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</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/goods/subsvc/selectSubsvcList"/>">
|
||||
<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 colspan="3">
|
||||
<div class="td-inner">
|
||||
<div class="b-checkbox-container">
|
||||
<label class="b-checkbox checkbox">
|
||||
<input type="checkbox" id="srchCurMonExclude" name="srchCurMonExclude" value="Y" <c:if test="${resultMap.paramVO.srchCurMonExclude eq 'Y'}">checked</c:if>>
|
||||
<span class="check"></span>
|
||||
<span class="control-label">당월 처리자 제외</span>
|
||||
</label>
|
||||
</div>
|
||||
</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