주문 > 주문 관리 > 전체주문조회 > 발주서 다운로드 - 발주서 관리
This commit is contained in:
@@ -238,13 +238,6 @@ public interface BOOrdrMapper {
|
|||||||
* @return List<LinkedHashMap>
|
* @return List<LinkedHashMap>
|
||||||
*/
|
*/
|
||||||
public List<LinkedHashMap> selectExcelListByOrder(BOOrdrSrchVO ordrSrchVO);
|
public List<LinkedHashMap> selectExcelListByOrder(BOOrdrSrchVO ordrSrchVO);
|
||||||
|
|
||||||
/**
|
|
||||||
* 관리자 > 주문 > 주문관리 > 전체 주문 조회 > 전체주문 목록 조회 > 엑셀다운로드 발주서
|
|
||||||
* @param ordrSrchVO
|
|
||||||
* @return List<LinkedHashMap>
|
|
||||||
*/
|
|
||||||
public List<DataMap> selectExcelListPurchOrder(BOOrdrSrchVO ordrSrchVO);
|
|
||||||
/* ####################################
|
/* ####################################
|
||||||
관리자 > 주문 > 주문관리 > 전체 주문 조회 > 전체주문 목록 조회 종료
|
관리자 > 주문 > 주문관리 > 전체 주문 조회 > 전체주문 목록 조회 종료
|
||||||
#################################### */
|
#################################### */
|
||||||
@@ -504,6 +497,40 @@ public interface BOOrdrMapper {
|
|||||||
관리자 > 주문 > 주문관리 > 다운로드항목설정 종료
|
관리자 > 주문 > 주문관리 > 다운로드항목설정 종료
|
||||||
#################################### */
|
#################################### */
|
||||||
|
|
||||||
|
/* ####################################
|
||||||
|
관리자 > 주문 > 주문관리 > 발주서 관리 시작
|
||||||
|
#################################### */
|
||||||
|
/**
|
||||||
|
* 관리자 > 주문 > 주문관리 > 전체 주문 조회 > 전체주문 목록 조회 > 발주서 건수
|
||||||
|
* @param ordrSrchVO
|
||||||
|
* @return List<LinkedHashMap>
|
||||||
|
*/
|
||||||
|
public Integer selectExcelListPurchOrderTotCnt(BOOrdrSrchVO ordrSrchVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 관리자 > 주문 > 주문관리 > 전체 주문 조회 > 전체주문 목록 조회 > 발주서 목록 조회
|
||||||
|
* @param ordrSrchVO
|
||||||
|
* @return List<LinkedHashMap>
|
||||||
|
*/
|
||||||
|
public List<DataMap> selectExcelListPurchOrder(BOOrdrSrchVO ordrSrchVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 관리자 > 주문 > 주문관리 > 전체 주문 조회 > 전체주문 목록 조회 > 발주서 엑셀다운로드
|
||||||
|
* @param ordrSrchVO
|
||||||
|
* @return List<LinkedHashMap>
|
||||||
|
*/
|
||||||
|
public List<DataMap> selectExcelPoListDwld(BOOrdrSrchVO ordrSrchVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 관리자 > 주문 > 주문관리 > 전체 주문 조회 > 전체주문 목록 조회 > 엑셀 다운로드 일시 업데이트
|
||||||
|
* @param ordrSrchVO
|
||||||
|
* @return List<LinkedHashMap>
|
||||||
|
*/
|
||||||
|
public Integer updateExcelDownDt(BOOrdrSrchVO ordrSrchVO);
|
||||||
|
/* ####################################
|
||||||
|
관리자 > 주문 > 주문관리 > 발주서 관리 종료
|
||||||
|
#################################### */
|
||||||
|
|
||||||
/* ####################################
|
/* ####################################
|
||||||
사용자 > 마이페이지 > MY쇼핑 > 개인결제 시작
|
사용자 > 마이페이지 > MY쇼핑 > 개인결제 시작
|
||||||
#################################### */
|
#################################### */
|
||||||
|
|||||||
@@ -682,15 +682,6 @@ public class BOOrdrService{
|
|||||||
return mapper.selectExcelListByOrder(ordrSrchVO);
|
return mapper.selectExcelListByOrder(ordrSrchVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 관리자 > 주문 > 주문관리 > 전체 주문 조회 > 전체주문 목록 조회 > 엑셀다운로드 발주서
|
|
||||||
* @param ordrSrchVO
|
|
||||||
* @return List<LinkedHashMap>
|
|
||||||
*/
|
|
||||||
public List<DataMap> selectExcelListPurchOrder(BOOrdrSrchVO ordrSrchVO) {
|
|
||||||
return mapper.selectExcelListPurchOrder(ordrSrchVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 관리자 > 주문 > 주문관리 > 전체 주문 조회 > 전체주문 목록 조회 > 주문내역서 정보 조회
|
* 관리자 > 주문 > 주문관리 > 전체 주문 조회 > 전체주문 목록 조회 > 주문내역서 정보 조회
|
||||||
* @param ordrVO
|
* @param ordrVO
|
||||||
@@ -1307,6 +1298,49 @@ public class BOOrdrService{
|
|||||||
관리자 > 주문 > 주문관리 > 다운로드항목설정 종료
|
관리자 > 주문 > 주문관리 > 다운로드항목설정 종료
|
||||||
#################################### */
|
#################################### */
|
||||||
|
|
||||||
|
/* ####################################
|
||||||
|
관리자 > 주문 > 주문관리 > 발주서 관리 시작
|
||||||
|
#################################### */
|
||||||
|
/**
|
||||||
|
* 관리자 > 주문 > 주문관리 > 발주서 다운로드 > 발주서 목록 조회
|
||||||
|
* @param ordrSrchVO
|
||||||
|
* @return List<LinkedHashMap>
|
||||||
|
*/
|
||||||
|
public List<DataMap> selectExcelPoList(BOOrdrSrchVO ordrSrchVO) {
|
||||||
|
List<DataMap> excelListPO = null;
|
||||||
|
|
||||||
|
// 건수 조회
|
||||||
|
Integer totCnt = mapper.selectExcelListPurchOrderTotCnt(ordrSrchVO);
|
||||||
|
ordrSrchVO.getPaginationInfo().setTotalRecordCount(totCnt);
|
||||||
|
|
||||||
|
if(totCnt > 0) {
|
||||||
|
excelListPO = mapper.selectExcelListPurchOrder(ordrSrchVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
return excelListPO;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 관리자 > 주문 > 주문관리 > 발주서 다운로드 > 발주서 다운로드
|
||||||
|
* @param ordrSrchVO
|
||||||
|
* @return List<LinkedHashMap>
|
||||||
|
*/
|
||||||
|
public List<DataMap> selectExcelPoListDwld(BOOrdrSrchVO ordrSrchVO) {
|
||||||
|
return mapper.selectExcelPoListDwld(ordrSrchVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 관리자 > 주문 > 주문관리 > 발주서 다운로드 > 엑셀 다운로드 일시 업데이트
|
||||||
|
* @param ordrSrchVO
|
||||||
|
* @return List<LinkedHashMap>
|
||||||
|
*/
|
||||||
|
public Integer updateExcelDownDt(BOOrdrSrchVO ordrSrchVO) {
|
||||||
|
return mapper.updateExcelDownDt(ordrSrchVO);
|
||||||
|
}
|
||||||
|
/* ####################################
|
||||||
|
관리자 > 주문 > 주문관리 > 발주서 관리 종료
|
||||||
|
#################################### */
|
||||||
|
|
||||||
/* ####################################
|
/* ####################################
|
||||||
관리자 > 주문 > 개인결제관리 시작
|
관리자 > 주문 > 개인결제관리 시작
|
||||||
#################################### */
|
#################################### */
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import com.wb.domainserver.domain.comm.vo.AbstractVO;
|
|||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class BOOrdrSrchVO extends AbstractVO{
|
public class BOOrdrSrchVO extends AbstractVO{
|
||||||
@@ -82,7 +86,15 @@ public class BOOrdrSrchVO extends AbstractVO{
|
|||||||
|
|
||||||
private String[] srchOrdrInnbs; // 주문번호 배열
|
private String[] srchOrdrInnbs; // 주문번호 배열
|
||||||
|
|
||||||
|
private String[] srchOrdrDlvyInnbs; // 배송번호 배열
|
||||||
|
|
||||||
|
private List<Map<String, String>> srchInnbPairs; // 발주서 주키 배열
|
||||||
|
|
||||||
private String srchDatePeriod; // 날짜구간코드
|
private String srchDatePeriod; // 날짜구간코드
|
||||||
|
|
||||||
|
private String[] dlvylcAreaCds; // 배송지역코드
|
||||||
|
|
||||||
|
private String excelInclude; // 엑셀 다운여부
|
||||||
/*
|
/*
|
||||||
####################################
|
####################################
|
||||||
전체 주문 조회 검색 추가 조건 종료
|
전체 주문 조회 검색 추가 조건 종료
|
||||||
|
|||||||
@@ -45,13 +45,12 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.CookieValue;
|
import org.springframework.web.bind.annotation.CookieValue;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -626,137 +625,7 @@ public class OrdrmngrController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 발주서 엑셀다운로드
|
|
||||||
* @param response
|
|
||||||
* @param ordrSrchVO
|
|
||||||
* @return ResponseEntity<WnbtResponse>
|
|
||||||
*/
|
|
||||||
@Policy(AuthPolicy.PUBLIC)
|
|
||||||
@RequestMapping(value="/selectExcelPoDwldListInqire")
|
|
||||||
public void selectPurchOrderExcelList(HttpServletResponse response, BOOrdrSrchVO ordrSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
|
||||||
String secretKey = commonService.selectSecretkey();
|
|
||||||
ordrSrchVO.setSecretKey(secretKey);
|
|
||||||
ordrSrchVO.setSopmalCd(authSopmalCd);
|
|
||||||
|
|
||||||
//엑셀 항목별 제목에 출력될 내용 설정
|
|
||||||
LinkedHashMap<String, String> headerMap = new LinkedHashMap<String, String>();
|
|
||||||
List<String> headerValues = List.of(
|
|
||||||
"날짜",
|
|
||||||
"업체코드",
|
|
||||||
"업체명",
|
|
||||||
"업체TEL",
|
|
||||||
"업체주소",
|
|
||||||
"특별통관업체명",
|
|
||||||
"특별통관번호",
|
|
||||||
"주문번호",
|
|
||||||
"용도구분",
|
|
||||||
"수취인",
|
|
||||||
"수취인TEL",
|
|
||||||
"수취인HP",
|
|
||||||
"개인통관고유부호",
|
|
||||||
"우편번호",
|
|
||||||
"주소",
|
|
||||||
"나머지주소",
|
|
||||||
"메모",
|
|
||||||
"고객 구입사이트",
|
|
||||||
"무게",
|
|
||||||
"포장개수",
|
|
||||||
"HS CODE",
|
|
||||||
"상거래유형",
|
|
||||||
"내용물",
|
|
||||||
"Unit Value",
|
|
||||||
"상품개수",
|
|
||||||
"Value",
|
|
||||||
"Brand",
|
|
||||||
"사전식품신고 종류",
|
|
||||||
"제조국",
|
|
||||||
"제조회사명",
|
|
||||||
"중문상품명",
|
|
||||||
"Shipper 구입사이트",
|
|
||||||
"판매중개업체명",
|
|
||||||
"판매중개업체 등록부호",
|
|
||||||
"구매(배송)대행업체명",
|
|
||||||
"구매(배송)대행업체 등록부호",
|
|
||||||
"해외판매자명",
|
|
||||||
"해외판매자 등록부호",
|
|
||||||
"사이트 주문번호"
|
|
||||||
);
|
|
||||||
for (int i = 0; i < headerValues.size(); i++) {
|
|
||||||
headerMap.put(String.format("item%02d", i + 1), headerValues.get(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
//엑셀 항목에 출력될 내용 설정
|
|
||||||
List<DataMap> resultList = service.selectExcelListPurchOrder(ordrSrchVO);
|
|
||||||
List<Map<String, Object>> excelList = new ArrayList<>();
|
|
||||||
if (resultList != null) {
|
|
||||||
for (int i = 0; i < resultList.size(); i++) {
|
|
||||||
HashMap<String, Object> dataMap = new HashMap<>();
|
|
||||||
// int cellInt = 1; // 셀 타입 = 숫자
|
|
||||||
List<Object> dataValues = Arrays.asList(
|
|
||||||
resultList.get(i).get("ordrRceptDt"),
|
|
||||||
resultList.get(i).get("entrpsCd"),
|
|
||||||
resultList.get(i).get("entrpsNm"),
|
|
||||||
resultList.get(i).get("entrpsTel"),
|
|
||||||
resultList.get(i).get("entrpsAdres"),
|
|
||||||
resultList.get(i).get("spclCstmclerEntrps"),
|
|
||||||
resultList.get(i).get("spclCstmclerCd"),
|
|
||||||
resultList.get(i).get("ordrInnb"),
|
|
||||||
resultList.get(i).get("purpsDv"),
|
|
||||||
resultList.get(i).get("recpntNm"),
|
|
||||||
resultList.get(i).get("recpntMbtlnb"),
|
|
||||||
resultList.get(i).get("recpntHp"),
|
|
||||||
resultList.get(i).get("cstmclerCd"),
|
|
||||||
resultList.get(i).get("dlvylcZip"),
|
|
||||||
resultList.get(i).get("dlvylcRnmLnbAdres"),
|
|
||||||
resultList.get(i).get("dlvylcAdresDtl"),
|
|
||||||
resultList.get(i).get("dlvyMssageCn"),
|
|
||||||
resultList.get(i).get("cstmrPurchsSite"),
|
|
||||||
resultList.get(i).get("realWt"),
|
|
||||||
resultList.get(i).get("packageCnt"),
|
|
||||||
resultList.get(i).get("hscode"),
|
|
||||||
resultList.get(i).get("cmmrcTy"),
|
|
||||||
resultList.get(i).get("cn"),
|
|
||||||
resultList.get(i).get("unitValue"),
|
|
||||||
resultList.get(i).get("ordrQy"),
|
|
||||||
resultList.get(i).get("value"),
|
|
||||||
resultList.get(i).get("brand"),
|
|
||||||
resultList.get(i).get("preFoodDcl"),
|
|
||||||
resultList.get(i).get("provdNation"),
|
|
||||||
resultList.get(i).get("provdCmpnyNm"),
|
|
||||||
resultList.get(i).get("chnlngGoodsNm"),
|
|
||||||
resultList.get(i).get("shipperPurchsSite"),
|
|
||||||
resultList.get(i).get("sleAgntEntrpsNm"),
|
|
||||||
resultList.get(i).get("sleAgntEntrpsRegistCd"),
|
|
||||||
resultList.get(i).get("purchsDlvyAgencyNm"),
|
|
||||||
resultList.get(i).get("purchsDlvyAgencyRegistCd"),
|
|
||||||
resultList.get(i).get("ovseaSelerNm"),
|
|
||||||
resultList.get(i).get("ovseaSelerRegistCd"),
|
|
||||||
resultList.get(i).get("siteOrdrInnb")
|
|
||||||
);
|
|
||||||
|
|
||||||
for (int j = 0; j < dataValues.size(); j++) {
|
|
||||||
dataMap.put(String.format("item%02d", j + 1), dataValues.get(j));
|
|
||||||
}
|
|
||||||
excelList.add(dataMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************/
|
|
||||||
try {
|
|
||||||
//엑셀생성 및 다운로드
|
|
||||||
LocalDateTime now = LocalDateTime.now();
|
|
||||||
String excelFileName = "발주서_";
|
|
||||||
|
|
||||||
excelFileName += String.format("%s~%s", ordrSrchVO.getSrchStartDate(), ordrSrchVO.getSrchEndDate()); // 엑셀 다운로드 파일명
|
|
||||||
|
|
||||||
String encodedFileName = URLEncoder.encode(excelFileName, StandardCharsets.UTF_8.toString()).replaceAll("\\+", "%20");
|
|
||||||
ExcelDownloadUtil.createExcel(encodedFileName, headerMap, excelList, response);
|
|
||||||
} catch (IOException ioe) {
|
|
||||||
log.error("엑셀다운로드 중 오류가 발생하였습니다.", ioe);
|
|
||||||
throw new WnbtRestException("엑셀다운로드 중 오류가 발생하였습니다.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주문내역서 팝업 화면 이동
|
* 주문내역서 팝업 화면 이동
|
||||||
@@ -1818,6 +1687,239 @@ public class OrdrmngrController {
|
|||||||
다운로드항목설정 종료
|
다운로드항목설정 종료
|
||||||
#################################### */
|
#################################### */
|
||||||
|
|
||||||
|
/* ####################################
|
||||||
|
발주서 관리 시작
|
||||||
|
#################################### */
|
||||||
|
/**
|
||||||
|
* 발주서 관리 화면 이동
|
||||||
|
* @param ordrSrchVO
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@RequestMapping(value="/selectExcelPoListInqireRForm")
|
||||||
|
public String selectExcelPoListInqireForm(ModelMap model, BOOrdrSrchVO ordrSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||||
|
ordrSrchVO.setSopmalCd(authSopmalCd);
|
||||||
|
model.addAttribute("sopmalCd", ordrSrchVO.getSopmalCd());
|
||||||
|
model.addAttribute("ordrSrchVO", ordrSrchVO);
|
||||||
|
|
||||||
|
// 공통코드 호출
|
||||||
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
|
bOMaComncdVO.setGroupCd("NATION_CD"); // 국가코드(NATION_CD)
|
||||||
|
model.addAttribute("nationCdList", bOMaComncdService.selectBOCommcdDetailList(bOMaComncdVO));
|
||||||
|
|
||||||
|
return "mngr/ordr/ordrmngr/PurchOrdrListInqireRForm";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 발주서 목록 조회
|
||||||
|
* @param ordrSrchVO
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
|
@RequestMapping(value= "/selectExcelPoListInqire" , method = RequestMethod.POST)
|
||||||
|
public String selectExcelPoListInqire(ModelMap model, BOOrdrSrchVO ordrSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd){
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
String secretKey = commonService.selectSecretkey();
|
||||||
|
ordrSrchVO.setSecretKey(secretKey);
|
||||||
|
ordrSrchVO.setSopmalCd(authSopmalCd);
|
||||||
|
ordrSrchVO.setSrchOrdrSttusCd("35");
|
||||||
|
|
||||||
|
//페이징 처리를 위한 pagination 객체 생성
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(ordrSrchVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(ordrSrchVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(paginationProperties.getPageSize());
|
||||||
|
ordrSrchVO.setPaginationInfo(paginationInfo);
|
||||||
|
|
||||||
|
//페이징 처리를 위한 값 설정
|
||||||
|
ordrSrchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
ordrSrchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
ordrSrchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||||
|
|
||||||
|
//회원 목록 조회 결과 및 페이징정보 넣기
|
||||||
|
content.put("paginationInfo", ordrSrchVO.getPaginationInfo());
|
||||||
|
content.put("resultList", service.selectExcelPoList(ordrSrchVO));
|
||||||
|
|
||||||
|
model.addAttribute("resultMap", content);
|
||||||
|
model.addAttribute("ordrSrchVO", ordrSrchVO);
|
||||||
|
|
||||||
|
return "mngr/ordr/ordrmngr/PurchOrdrListInqireR";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 주문내역서 팝업 화면 이동
|
||||||
|
* @param model
|
||||||
|
* @param ordrSrchVO
|
||||||
|
* @return OrdrDtstmnDwldPopupR.jsp
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@RequestMapping(value="/selectPurchOrdrDtstmnDwldPopupForm")
|
||||||
|
public String selectPurchOrdrDtstmnDwldPopupForm(ModelMap model, BOOrdrSrchVO ordrSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) throws Exception {
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
BOOrdrVO ordrVO = new BOOrdrVO();
|
||||||
|
ordrVO.setOrdrInnbs(ordrSrchVO.getSrchOrdrInnbs());
|
||||||
|
ordrVO.setSopmalCd(authSopmalCd);
|
||||||
|
|
||||||
|
content.put("ordrDtstmnDwldList", service.selectOrdrDtstmnDwld(ordrVO));
|
||||||
|
model.addAttribute("data", content);
|
||||||
|
model.addAttribute("ordrSrchVO", ordrSrchVO);
|
||||||
|
|
||||||
|
return "mngr/ordr/ordrmngr/PurchOrdrDtstmnDwldPopupR";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 발주서 엑셀다운로드
|
||||||
|
* @param response
|
||||||
|
* @param ordrSrchVO
|
||||||
|
* @return ResponseEntity<WnbtResponse>
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.PUBLIC)
|
||||||
|
@RequestMapping(value="/selectExcelPoDwldListInqire")
|
||||||
|
public void selectPurchOrderExcelList(HttpServletResponse response, BOOrdrSrchVO ordrSrchVO, @CookieValue(value = "authSopmalCd") String authSopmalCd) {
|
||||||
|
String secretKey = commonService.selectSecretkey();
|
||||||
|
ordrSrchVO.setSecretKey(secretKey);
|
||||||
|
ordrSrchVO.setSopmalCd(authSopmalCd);
|
||||||
|
ordrSrchVO.setSrchOrdrSttusCd("35");
|
||||||
|
|
||||||
|
//엑셀 항목별 제목에 출력될 내용 설정
|
||||||
|
LinkedHashMap<String, String> headerMap = new LinkedHashMap<String, String>();
|
||||||
|
List<String> headerValues = List.of(
|
||||||
|
"날짜",
|
||||||
|
"업체코드",
|
||||||
|
"업체명",
|
||||||
|
"업체TEL",
|
||||||
|
"업체주소",
|
||||||
|
"특별통관업체명",
|
||||||
|
"특별통관번호",
|
||||||
|
"주문번호",
|
||||||
|
"용도구분",
|
||||||
|
"수취인",
|
||||||
|
"수취인TEL",
|
||||||
|
"수취인HP",
|
||||||
|
"개인통관고유부호",
|
||||||
|
"우편번호",
|
||||||
|
"주소",
|
||||||
|
"나머지주소",
|
||||||
|
"메모",
|
||||||
|
"고객 구입사이트",
|
||||||
|
"무게",
|
||||||
|
"포장개수",
|
||||||
|
"HS CODE",
|
||||||
|
"상거래유형",
|
||||||
|
"내용물",
|
||||||
|
"Unit Value",
|
||||||
|
"상품개수",
|
||||||
|
"Value",
|
||||||
|
"Brand",
|
||||||
|
"사전식품신고 종류",
|
||||||
|
"제조국",
|
||||||
|
"제조회사명",
|
||||||
|
"중문상품명",
|
||||||
|
"Shipper 구입사이트",
|
||||||
|
"판매중개업체명",
|
||||||
|
"판매중개업체 등록부호",
|
||||||
|
"구매(배송)대행업체명",
|
||||||
|
"구매(배송)대행업체 등록부호",
|
||||||
|
"해외판매자명",
|
||||||
|
"해외판매자 등록부호",
|
||||||
|
"사이트 주문번호"
|
||||||
|
);
|
||||||
|
for (int i = 0; i < headerValues.size(); i++) {
|
||||||
|
headerMap.put(String.format("item%02d", i + 1), headerValues.get(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] ordrInnbs = ordrSrchVO.getSrchOrdrInnbs();
|
||||||
|
String[] ordrDlvyInnbs = ordrSrchVO.getSrchOrdrDlvyInnbs();
|
||||||
|
List<Map<String, String>> srchInnbPairs = new ArrayList<>();
|
||||||
|
if (ordrInnbs != null && ordrDlvyInnbs != null) {
|
||||||
|
for (int i = 0; i < ordrInnbs.length; i++) {
|
||||||
|
Map<String, String> pair = new HashMap<>();
|
||||||
|
pair.put("srchOrdrInnb", ordrInnbs[i]);
|
||||||
|
pair.put("srchOrdrDlvyInnb", ordrDlvyInnbs[i]);
|
||||||
|
|
||||||
|
srchInnbPairs.add(pair);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ordrSrchVO.setSrchInnbPairs(srchInnbPairs);
|
||||||
|
|
||||||
|
//엑셀 항목에 출력될 내용 설정
|
||||||
|
List<DataMap> resultList = service.selectExcelPoListDwld(ordrSrchVO);
|
||||||
|
List<Map<String, Object>> excelList = new ArrayList<>();
|
||||||
|
if (resultList != null) {
|
||||||
|
for (int i = 0; i < resultList.size(); i++) {
|
||||||
|
HashMap<String, Object> dataMap = new HashMap<>();
|
||||||
|
// int cellInt = 1; // 셀 타입 = 숫자
|
||||||
|
List<Object> dataValues = Arrays.asList(
|
||||||
|
resultList.get(i).get("ordrRceptDt"),
|
||||||
|
resultList.get(i).get("entrpsCd"),
|
||||||
|
resultList.get(i).get("entrpsNm"),
|
||||||
|
resultList.get(i).get("entrpsTel"),
|
||||||
|
resultList.get(i).get("entrpsAdres"),
|
||||||
|
resultList.get(i).get("spclCstmclerEntrps"),
|
||||||
|
resultList.get(i).get("spclCstmclerCd"),
|
||||||
|
resultList.get(i).get("ordrInnb"),
|
||||||
|
resultList.get(i).get("purpsDv"),
|
||||||
|
resultList.get(i).get("recpntNm"),
|
||||||
|
resultList.get(i).get("recpntMbtlnb"),
|
||||||
|
resultList.get(i).get("recpntHp"),
|
||||||
|
resultList.get(i).get("cstmclerCd"),
|
||||||
|
resultList.get(i).get("dlvylcZip"),
|
||||||
|
resultList.get(i).get("dlvylcRnmLnbAdres"),
|
||||||
|
resultList.get(i).get("dlvylcAdresDtl"),
|
||||||
|
resultList.get(i).get("dlvyMssageCn"),
|
||||||
|
resultList.get(i).get("cstmrPurchsSite"),
|
||||||
|
resultList.get(i).get("realWt"),
|
||||||
|
resultList.get(i).get("packageCnt"),
|
||||||
|
resultList.get(i).get("hscode"),
|
||||||
|
resultList.get(i).get("cmmrcTy"),
|
||||||
|
resultList.get(i).get("cn"),
|
||||||
|
resultList.get(i).get("unitValue"),
|
||||||
|
resultList.get(i).get("ordrQy"),
|
||||||
|
resultList.get(i).get("value"),
|
||||||
|
resultList.get(i).get("brand"),
|
||||||
|
resultList.get(i).get("preFoodDcl"),
|
||||||
|
resultList.get(i).get("provdNation"),
|
||||||
|
resultList.get(i).get("provdCmpnyNm"),
|
||||||
|
resultList.get(i).get("chnlngGoodsNm"),
|
||||||
|
resultList.get(i).get("shipperPurchsSite"),
|
||||||
|
resultList.get(i).get("sleAgntEntrpsNm"),
|
||||||
|
resultList.get(i).get("sleAgntEntrpsRegistCd"),
|
||||||
|
resultList.get(i).get("purchsDlvyAgencyNm"),
|
||||||
|
resultList.get(i).get("purchsDlvyAgencyRegistCd"),
|
||||||
|
resultList.get(i).get("ovseaSelerNm"),
|
||||||
|
resultList.get(i).get("ovseaSelerRegistCd"),
|
||||||
|
resultList.get(i).get("siteOrdrInnb")
|
||||||
|
);
|
||||||
|
|
||||||
|
for (int j = 0; j < dataValues.size(); j++) {
|
||||||
|
dataMap.put(String.format("item%02d", j + 1), dataValues.get(j));
|
||||||
|
}
|
||||||
|
excelList.add(dataMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************/
|
||||||
|
try {
|
||||||
|
//엑셀생성 및 다운로드
|
||||||
|
/*LocalDateTime now = LocalDateTime.now();
|
||||||
|
String excelFileName = "발주서_";
|
||||||
|
|
||||||
|
excelFileName += String.format("%s~%s", ordrSrchVO.getSrchStartDate(), ordrSrchVO.getSrchEndDate()); // 엑셀 다운로드 파일명*/
|
||||||
|
|
||||||
|
String excelFileName = "발주서";
|
||||||
|
String encodedFileName = URLEncoder.encode(excelFileName, StandardCharsets.UTF_8.toString()).replaceAll("\\+", "%20");
|
||||||
|
ExcelDownloadUtil.createExcel(encodedFileName, headerMap, excelList, response);
|
||||||
|
|
||||||
|
service.updateExcelDownDt(ordrSrchVO);
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
log.error("엑셀다운로드 중 오류가 발생하였습니다.", ioe);
|
||||||
|
throw new WnbtRestException("엑셀다운로드 중 오류가 발생하였습니다.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* ####################################
|
||||||
|
발주서 관리 종료
|
||||||
|
#################################### */
|
||||||
|
|
||||||
/* ####################################
|
/* ####################################
|
||||||
주문조회 팝업 시작
|
주문조회 팝업 시작
|
||||||
#################################### */
|
#################################### */
|
||||||
|
|||||||
@@ -1440,101 +1440,6 @@
|
|||||||
GROUP BY A.ORDR_INNB
|
GROUP BY A.ORDR_INNB
|
||||||
) EXCEL
|
) EXCEL
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 전체 주문 조회 > 엑셀다운로드 발주서 -->
|
|
||||||
<select id="selectExcelListPurchOrder" parameterType="com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrSrchVO" resultType="dataMap">
|
|
||||||
SELECT
|
|
||||||
GO.ORDR_RCEPT_DT,
|
|
||||||
'UNIHAN' AS ENTRPS_CD,
|
|
||||||
'UNIHAN CO.,LTD.' AS ENTRPS_NM,
|
|
||||||
'03-5990-2880' AS ENTRPS_TEL,
|
|
||||||
'RM.302,YOTSUYA-AKEBONOBASHI BLDG.,2-14, SUMIYOSHI-CHO, SHINJUKU-KU, TOKYO, 162-0065, JAPAN' AS ENTRPS_ADRES,
|
|
||||||
NULL AS SPCL_CSTMCLER_ENTRPS,
|
|
||||||
NULL AS SPCL_CSTMCLER_CD,
|
|
||||||
GO.ORDR_INNB,
|
|
||||||
1 AS PURPS_DV,
|
|
||||||
GOS.RECPNT_NM,
|
|
||||||
CAST(AES_DECRYPT(UNHEX(GOS.RECPNT_MBTLNB) , #{secretKey}) AS CHAR(50)) AS RECPNT_MBTLNB,
|
|
||||||
NULL AS RECPNT_HP,
|
|
||||||
GOS.CSTMCLER_CD,
|
|
||||||
GOS.DLVYLC_ZIP,
|
|
||||||
CASE
|
|
||||||
WHEN GOS.DLVYLC_ADRES_DV_CD = '01'
|
|
||||||
THEN GOS.DLVYLC_RNM_ADRES
|
|
||||||
ELSE GOS.DLVYLC_LNB_ADRES
|
|
||||||
END DLVYLC_RNM_LNB_ADRES,
|
|
||||||
GOS.DLVYLC_ADRES_DTL,
|
|
||||||
GOS.DLVY_MSSAGE_CN,
|
|
||||||
'www.sake1jan.com' AS CSTMR_PURCHS_SITE,
|
|
||||||
GOIO.REAL_WT,
|
|
||||||
GOIO.PACKAGE_CNT,
|
|
||||||
GOIO.HSCODE,
|
|
||||||
'A' AS CMMRC_TY,
|
|
||||||
CONCAT(GOI.GOODS_NM_EN, ' ', GOIO.OPTN_NM_1, '-', GOIO.OPTN_VAL_1) AS CN,
|
|
||||||
/*원가 관리 시작*/
|
|
||||||
GOIO.SLEPRIC,
|
|
||||||
GOS.DFT_DLVY_AMT,
|
|
||||||
GGC.CSTMS_FEE,
|
|
||||||
(
|
|
||||||
(GOIO.SLEPRIC + GOS.DFT_DLVY_AMT)
|
|
||||||
* GGC.PLTFOM_FEE
|
|
||||||
* GGC.EXPCT_TAX
|
|
||||||
) AS EXPCT_TAX_AMT,
|
|
||||||
GGC.EXPCT_TAX,
|
|
||||||
GGC.KR_DLVY_CT,
|
|
||||||
GGC.PLTFOM_FEE,
|
|
||||||
GGC.USD_RATE,
|
|
||||||
GGO.TAXABLE_USD AS UNIT_VALUE,
|
|
||||||
/*원가 관리 종료*/
|
|
||||||
GOIO.ORDR_QY,
|
|
||||||
GGO.TAXABLE_USD * GOIO.ORDR_QY AS VALUE,
|
|
||||||
NULL AS BRAND,
|
|
||||||
NULL AS PRE_FOOD_DCL,
|
|
||||||
NULL AS PROVD_NATION,
|
|
||||||
NULL AS PROVD_CMPNY_NM,
|
|
||||||
NULL AS CHNLNG_GOODS_NM,
|
|
||||||
NULL AS SHIPPER_PURCHS_SITE,
|
|
||||||
NULL AS SLE_AGNT_ENTRPS_NM,
|
|
||||||
NULL AS SLE_AGNT_ENTRPS_REGIST_CD,
|
|
||||||
NULL AS PURCHS_DLVY_AGENCY_NM,
|
|
||||||
NULL AS PURCHS_DLVY_AGENCY_REGIST_CD,
|
|
||||||
NULL AS OVSEA_SELER_NM,
|
|
||||||
GOS.ORDR_DLVY_INNB AS OVSEA_SELER_REGIST_CD,
|
|
||||||
CONCAT(GO.SUBSVC_AT, GOS.DLVYLC_AREA_CD, GOS.ORDR_DLVY_INNB) AS SITE_ORDR_INNB,
|
|
||||||
/*아래부터는 발주서에 포함되지 않음*/
|
|
||||||
GO.ORDR_STTUS_CD,
|
|
||||||
GOI.ORDR_GOODS_INNB,
|
|
||||||
GOI.GOODS_INNB,
|
|
||||||
GOI.GOODS_NM,
|
|
||||||
GOIO.ORDR_GOODS_OPTN_INNB,
|
|
||||||
GOIO.GOODS_OPTN_INNB,
|
|
||||||
GOS.DLVYLC_AREA_CD,
|
|
||||||
GGC.STDR_DE
|
|
||||||
FROM GC_ORDER GO
|
|
||||||
INNER JOIN GC_ORDER_ITEM GOI
|
|
||||||
ON GOI.ORDR_INNB = GO.ORDR_INNB
|
|
||||||
AND GOI.SOPMAL_CD = GO.SOPMAL_CD
|
|
||||||
INNER JOIN GC_ORDER_ITEM_OPTION GOIO
|
|
||||||
ON GOIO.ORDR_GOODS_INNB = GOI.ORDR_GOODS_INNB
|
|
||||||
AND GOIO.SOPMAL_CD = GOI.SOPMAL_CD
|
|
||||||
INNER JOIN GC_ORDER_SHIPPING GOS
|
|
||||||
ON GOS.ORDR_DLVY_INNB = GOIO.ORDR_DLVY_INNB
|
|
||||||
AND GOS.SOPMAL_CD = GOIO.SOPMAL_CD
|
|
||||||
INNER JOIN GC_GOODS_OPTION GGO
|
|
||||||
ON GGO.GOODS_OPTN_INNB = GOIO.GOODS_OPTN_INNB
|
|
||||||
AND GGO.GOODS_INNB = GOI.GOODS_INNB
|
|
||||||
AND GGO.SOPMAL_CD = GO.SOPMAL_CD
|
|
||||||
LEFT JOIN GC_GOODS_COST GGC
|
|
||||||
ON GGC.STDR_DE = (
|
|
||||||
SELECT MAX(GGC.STDR_DE)
|
|
||||||
FROM GC_GOODS_COST GGC
|
|
||||||
WHERE GGC.STDR_DE <![CDATA[<=]]> GO.ORDR_RCEPT_DT
|
|
||||||
)
|
|
||||||
WHERE 1 = 1
|
|
||||||
AND GO.ORDR_RCEPT_DT BETWEEN #{srchStartDate} AND #{srchEndDate} ' 23:59:59'
|
|
||||||
AND GOIO.ORDR_STTUS_CD = #{srchOrdrSttusCd}
|
|
||||||
AND GO.SOPMAL_CD = #{sopmalCd}
|
|
||||||
</select>
|
|
||||||
<!--
|
<!--
|
||||||
####################################
|
####################################
|
||||||
전체주문 조회 서비스 종료
|
전체주문 조회 서비스 종료
|
||||||
@@ -3019,6 +2924,281 @@
|
|||||||
####################################
|
####################################
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
####################################
|
||||||
|
관리자 > 주문 > 주문관리 > 발주서 관리 시작
|
||||||
|
####################################
|
||||||
|
-->
|
||||||
|
<!-- 발주서 목록 건수 -->
|
||||||
|
<select id="selectExcelListPurchOrderTotCnt" parameterType="com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrSrchVO" resultType="Integer">
|
||||||
|
SELECT COUNT(1)
|
||||||
|
FROM GC_ORDER GO
|
||||||
|
INNER JOIN GC_ORDER_ITEM GOI
|
||||||
|
ON GOI.ORDR_INNB = GO.ORDR_INNB
|
||||||
|
AND GOI.SOPMAL_CD = GO.SOPMAL_CD
|
||||||
|
INNER JOIN GC_ORDER_ITEM_OPTION GOIO
|
||||||
|
ON GOIO.ORDR_GOODS_INNB = GOI.ORDR_GOODS_INNB
|
||||||
|
AND GOIO.SOPMAL_CD = GOI.SOPMAL_CD
|
||||||
|
INNER JOIN GC_ORDER_SHIPPING GOS
|
||||||
|
ON GOS.ORDR_DLVY_INNB = GOIO.ORDR_DLVY_INNB
|
||||||
|
AND GOS.SOPMAL_CD = GOIO.SOPMAL_CD
|
||||||
|
INNER JOIN GC_GOODS_OPTION GGO
|
||||||
|
ON GGO.GOODS_OPTN_INNB = GOIO.GOODS_OPTN_INNB
|
||||||
|
AND GGO.GOODS_INNB = GOI.GOODS_INNB
|
||||||
|
AND GGO.SOPMAL_CD = GO.SOPMAL_CD
|
||||||
|
LEFT JOIN GC_GOODS_COST GGC
|
||||||
|
ON GGC.STDR_DE = (
|
||||||
|
SELECT MAX(GGC.STDR_DE)
|
||||||
|
FROM GC_GOODS_COST GGC
|
||||||
|
WHERE GGC.STDR_DE <![CDATA[<=]]> GO.ORDR_RCEPT_DT
|
||||||
|
)
|
||||||
|
WHERE 1 = 1
|
||||||
|
AND GOIO.ORDR_STTUS_CD = #{srchOrdrSttusCd}
|
||||||
|
AND GO.SOPMAL_CD = #{sopmalCd}
|
||||||
|
<if test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(dlvylcAreaCds)">
|
||||||
|
AND GOS.DLVYLC_AREA_CD IN
|
||||||
|
<foreach collection="dlvylcAreaCds" item="dlvylcAreaCd" open="(" separator="," close=")">
|
||||||
|
#{dlvylcAreaCd}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(excelInclude, 'N')">
|
||||||
|
AND GOS.EXCEL_DOWN_DT IS NULL
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 발주서 목록 조회 -->
|
||||||
|
<select id="selectExcelListPurchOrder" parameterType="com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrSrchVO" resultType="dataMap">
|
||||||
|
SELECT *
|
||||||
|
FROM (
|
||||||
|
SELECT CAST(@ROWNUM:=@ROWNUM+1 AS UNSIGNED) AS RNUM,
|
||||||
|
TB.*
|
||||||
|
FROM (
|
||||||
|
SELECT
|
||||||
|
GO.ORDR_RCEPT_DT,
|
||||||
|
'UNIHAN' AS ENTRPS_CD,
|
||||||
|
'UNIHAN CO.,LTD.' AS ENTRPS_NM,
|
||||||
|
'03-5990-2880' AS ENTRPS_TEL,
|
||||||
|
'RM.302,YOTSUYA-AKEBONOBASHI BLDG.,2-14, SUMIYOSHI-CHO, SHINJUKU-KU, TOKYO, 162-0065, JAPAN' AS ENTRPS_ADRES,
|
||||||
|
NULL AS SPCL_CSTMCLER_ENTRPS,
|
||||||
|
NULL AS SPCL_CSTMCLER_CD,
|
||||||
|
GO.ORDR_INNB,
|
||||||
|
1 AS PURPS_DV,
|
||||||
|
GOS.RECPNT_NM,
|
||||||
|
CAST(AES_DECRYPT(UNHEX(GOS.RECPNT_MBTLNB) , #{secretKey}) AS CHAR(50)) AS RECPNT_MBTLNB,
|
||||||
|
NULL AS RECPNT_HP,
|
||||||
|
GOS.CSTMCLER_CD,
|
||||||
|
GOS.DLVYLC_ZIP,
|
||||||
|
CASE
|
||||||
|
WHEN GOS.DLVYLC_ADRES_DV_CD = '01'
|
||||||
|
THEN GOS.DLVYLC_RNM_ADRES
|
||||||
|
ELSE GOS.DLVYLC_LNB_ADRES
|
||||||
|
END DLVYLC_RNM_LNB_ADRES,
|
||||||
|
GOS.DLVYLC_ADRES_DTL,
|
||||||
|
GOS.DLVY_MSSAGE_CN,
|
||||||
|
'www.sake1jan.com' AS CSTMR_PURCHS_SITE,
|
||||||
|
GOIO.REAL_WT,
|
||||||
|
GOIO.PACKAGE_CNT,
|
||||||
|
GOIO.HSCODE,
|
||||||
|
'A' AS CMMRC_TY,
|
||||||
|
CONCAT(GOI.GOODS_NM_EN, ' ', GOIO.OPTN_NM_1, '-', GOIO.OPTN_VAL_1) AS CN,
|
||||||
|
/*원가 관리 시작*/
|
||||||
|
GOIO.SLEPRIC,
|
||||||
|
GOS.DFT_DLVY_AMT,
|
||||||
|
GGC.CSTMS_FEE,
|
||||||
|
(
|
||||||
|
(GOIO.SLEPRIC + GOS.DFT_DLVY_AMT)
|
||||||
|
* GGC.PLTFOM_FEE
|
||||||
|
* GGC.EXPCT_TAX
|
||||||
|
) AS EXPCT_TAX_AMT,
|
||||||
|
GGC.EXPCT_TAX,
|
||||||
|
GGC.KR_DLVY_CT,
|
||||||
|
GGC.PLTFOM_FEE,
|
||||||
|
GGC.USD_RATE,
|
||||||
|
GGO.TAXABLE_USD AS UNIT_VALUE,
|
||||||
|
/*원가 관리 종료*/
|
||||||
|
GOIO.ORDR_QY,
|
||||||
|
GGO.TAXABLE_USD * GOIO.ORDR_QY AS VALUE,
|
||||||
|
NULL AS BRAND,
|
||||||
|
NULL AS PRE_FOOD_DCL,
|
||||||
|
NULL AS PROVD_NATION,
|
||||||
|
NULL AS PROVD_CMPNY_NM,
|
||||||
|
NULL AS CHNLNG_GOODS_NM,
|
||||||
|
NULL AS SHIPPER_PURCHS_SITE,
|
||||||
|
NULL AS SLE_AGNT_ENTRPS_NM,
|
||||||
|
NULL AS SLE_AGNT_ENTRPS_REGIST_CD,
|
||||||
|
NULL AS PURCHS_DLVY_AGENCY_NM,
|
||||||
|
NULL AS PURCHS_DLVY_AGENCY_REGIST_CD,
|
||||||
|
NULL AS OVSEA_SELER_NM,
|
||||||
|
GOS.ORDR_DLVY_INNB AS OVSEA_SELER_REGIST_CD,
|
||||||
|
CONCAT(GO.SUBSVC_AT, GOS.DLVYLC_AREA_CD, GOS.ORDR_DLVY_INNB) AS SITE_ORDR_INNB,
|
||||||
|
GOS.EXCEL_DOWN_DT,
|
||||||
|
/*아래부터는 발주서에 포함되지 않음*/
|
||||||
|
GO.ORDR_STTUS_CD,
|
||||||
|
GOI.ORDR_GOODS_INNB,
|
||||||
|
GOI.GOODS_INNB,
|
||||||
|
GOI.GOODS_NM,
|
||||||
|
GOIO.ORDR_GOODS_OPTN_INNB,
|
||||||
|
GOIO.GOODS_OPTN_INNB,
|
||||||
|
GOS.DLVYLC_AREA_CD,
|
||||||
|
GGC.STDR_DE
|
||||||
|
FROM GC_ORDER GO
|
||||||
|
INNER JOIN GC_ORDER_ITEM GOI
|
||||||
|
ON GOI.ORDR_INNB = GO.ORDR_INNB
|
||||||
|
AND GOI.SOPMAL_CD = GO.SOPMAL_CD
|
||||||
|
INNER JOIN GC_ORDER_ITEM_OPTION GOIO
|
||||||
|
ON GOIO.ORDR_GOODS_INNB = GOI.ORDR_GOODS_INNB
|
||||||
|
AND GOIO.SOPMAL_CD = GOI.SOPMAL_CD
|
||||||
|
INNER JOIN GC_ORDER_SHIPPING GOS
|
||||||
|
ON GOS.ORDR_DLVY_INNB = GOIO.ORDR_DLVY_INNB
|
||||||
|
AND GOS.SOPMAL_CD = GOIO.SOPMAL_CD
|
||||||
|
INNER JOIN GC_GOODS_OPTION GGO
|
||||||
|
ON GGO.GOODS_OPTN_INNB = GOIO.GOODS_OPTN_INNB
|
||||||
|
AND GGO.GOODS_INNB = GOI.GOODS_INNB
|
||||||
|
AND GGO.SOPMAL_CD = GO.SOPMAL_CD
|
||||||
|
LEFT JOIN GC_GOODS_COST GGC
|
||||||
|
ON GGC.STDR_DE = (
|
||||||
|
SELECT MAX(GGC.STDR_DE)
|
||||||
|
FROM GC_GOODS_COST GGC
|
||||||
|
WHERE GGC.STDR_DE <![CDATA[<=]]> GO.ORDR_RCEPT_DT
|
||||||
|
)
|
||||||
|
WHERE 1 = 1
|
||||||
|
AND GOIO.ORDR_STTUS_CD = #{srchOrdrSttusCd}
|
||||||
|
AND GO.SOPMAL_CD = #{sopmalCd}
|
||||||
|
<if test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isNotEmpty(dlvylcAreaCds)">
|
||||||
|
AND GOS.DLVYLC_AREA_CD IN
|
||||||
|
<foreach collection="dlvylcAreaCds" item="dlvylcAreaCd" open="(" separator="," close=")">
|
||||||
|
#{dlvylcAreaCd}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="@com.wb.domainserver.util.dataaccess.MybaitsUtil@isEquals(excelInclude, 'N')">
|
||||||
|
AND GOS.EXCEL_DOWN_DT IS NULL
|
||||||
|
</if>
|
||||||
|
ORDER BY GOS.CSTMCLER_CD ASC
|
||||||
|
) TB
|
||||||
|
WHERE (@rownum:=0)=0
|
||||||
|
) PV
|
||||||
|
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 발주서 엑셀다운로드 -->
|
||||||
|
<select id="selectExcelPoListDwld" parameterType="com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrSrchVO" resultType="dataMap">
|
||||||
|
SELECT
|
||||||
|
GO.ORDR_RCEPT_DT,
|
||||||
|
'UNIHAN' AS ENTRPS_CD,
|
||||||
|
'UNIHAN CO.,LTD.' AS ENTRPS_NM,
|
||||||
|
'03-5990-2880' AS ENTRPS_TEL,
|
||||||
|
'RM.302,YOTSUYA-AKEBONOBASHI BLDG.,2-14, SUMIYOSHI-CHO, SHINJUKU-KU, TOKYO, 162-0065, JAPAN' AS ENTRPS_ADRES,
|
||||||
|
NULL AS SPCL_CSTMCLER_ENTRPS,
|
||||||
|
NULL AS SPCL_CSTMCLER_CD,
|
||||||
|
GO.ORDR_INNB,
|
||||||
|
1 AS PURPS_DV,
|
||||||
|
GOS.RECPNT_NM,
|
||||||
|
CAST(AES_DECRYPT(UNHEX(GOS.RECPNT_MBTLNB) , #{secretKey}) AS CHAR(50)) AS RECPNT_MBTLNB,
|
||||||
|
NULL AS RECPNT_HP,
|
||||||
|
GOS.CSTMCLER_CD,
|
||||||
|
GOS.DLVYLC_ZIP,
|
||||||
|
CASE
|
||||||
|
WHEN GOS.DLVYLC_ADRES_DV_CD = '01'
|
||||||
|
THEN GOS.DLVYLC_RNM_ADRES
|
||||||
|
ELSE GOS.DLVYLC_LNB_ADRES
|
||||||
|
END DLVYLC_RNM_LNB_ADRES,
|
||||||
|
GOS.DLVYLC_ADRES_DTL,
|
||||||
|
GOS.DLVY_MSSAGE_CN,
|
||||||
|
'www.sake1jan.com' AS CSTMR_PURCHS_SITE,
|
||||||
|
GOIO.REAL_WT,
|
||||||
|
GOIO.PACKAGE_CNT,
|
||||||
|
GOIO.HSCODE,
|
||||||
|
'A' AS CMMRC_TY,
|
||||||
|
CONCAT(GOI.GOODS_NM_EN, ' ', GOIO.OPTN_NM_1, '-', GOIO.OPTN_VAL_1) AS CN,
|
||||||
|
/*원가 관리 시작*/
|
||||||
|
GOIO.SLEPRIC,
|
||||||
|
GOS.DFT_DLVY_AMT,
|
||||||
|
GGC.CSTMS_FEE,
|
||||||
|
(
|
||||||
|
(GOIO.SLEPRIC + GOS.DFT_DLVY_AMT)
|
||||||
|
* GGC.PLTFOM_FEE
|
||||||
|
* GGC.EXPCT_TAX
|
||||||
|
) AS EXPCT_TAX_AMT,
|
||||||
|
GGC.EXPCT_TAX,
|
||||||
|
GGC.KR_DLVY_CT,
|
||||||
|
GGC.PLTFOM_FEE,
|
||||||
|
GGC.USD_RATE,
|
||||||
|
GGO.TAXABLE_USD AS UNIT_VALUE,
|
||||||
|
/*원가 관리 종료*/
|
||||||
|
GOIO.ORDR_QY,
|
||||||
|
GGO.TAXABLE_USD * GOIO.ORDR_QY AS VALUE,
|
||||||
|
NULL AS BRAND,
|
||||||
|
NULL AS PRE_FOOD_DCL,
|
||||||
|
NULL AS PROVD_NATION,
|
||||||
|
NULL AS PROVD_CMPNY_NM,
|
||||||
|
NULL AS CHNLNG_GOODS_NM,
|
||||||
|
NULL AS SHIPPER_PURCHS_SITE,
|
||||||
|
NULL AS SLE_AGNT_ENTRPS_NM,
|
||||||
|
NULL AS SLE_AGNT_ENTRPS_REGIST_CD,
|
||||||
|
NULL AS PURCHS_DLVY_AGENCY_NM,
|
||||||
|
NULL AS PURCHS_DLVY_AGENCY_REGIST_CD,
|
||||||
|
NULL AS OVSEA_SELER_NM,
|
||||||
|
GOS.ORDR_DLVY_INNB AS OVSEA_SELER_REGIST_CD,
|
||||||
|
CONCAT(GO.SUBSVC_AT, GOS.DLVYLC_AREA_CD, GOS.ORDR_DLVY_INNB) AS SITE_ORDR_INNB,
|
||||||
|
GOS.EXCEL_DOWN_DT,
|
||||||
|
/*아래부터는 발주서에 포함되지 않음*/
|
||||||
|
GO.ORDR_STTUS_CD,
|
||||||
|
GOI.ORDR_GOODS_INNB,
|
||||||
|
GOI.GOODS_INNB,
|
||||||
|
GOI.GOODS_NM,
|
||||||
|
GOIO.ORDR_GOODS_OPTN_INNB,
|
||||||
|
GOIO.GOODS_OPTN_INNB,
|
||||||
|
GOS.DLVYLC_AREA_CD,
|
||||||
|
GGC.STDR_DE
|
||||||
|
FROM GC_ORDER GO
|
||||||
|
INNER JOIN GC_ORDER_ITEM GOI
|
||||||
|
ON GOI.ORDR_INNB = GO.ORDR_INNB
|
||||||
|
AND GOI.SOPMAL_CD = GO.SOPMAL_CD
|
||||||
|
INNER JOIN GC_ORDER_ITEM_OPTION GOIO
|
||||||
|
ON GOIO.ORDR_GOODS_INNB = GOI.ORDR_GOODS_INNB
|
||||||
|
AND GOIO.SOPMAL_CD = GOI.SOPMAL_CD
|
||||||
|
INNER JOIN GC_ORDER_SHIPPING GOS
|
||||||
|
ON GOS.ORDR_DLVY_INNB = GOIO.ORDR_DLVY_INNB
|
||||||
|
AND GOS.SOPMAL_CD = GOIO.SOPMAL_CD
|
||||||
|
INNER JOIN GC_GOODS_OPTION GGO
|
||||||
|
ON GGO.GOODS_OPTN_INNB = GOIO.GOODS_OPTN_INNB
|
||||||
|
AND GGO.GOODS_INNB = GOI.GOODS_INNB
|
||||||
|
AND GGO.SOPMAL_CD = GO.SOPMAL_CD
|
||||||
|
LEFT JOIN GC_GOODS_COST GGC
|
||||||
|
ON GGC.STDR_DE = (
|
||||||
|
SELECT MAX(GGC.STDR_DE)
|
||||||
|
FROM GC_GOODS_COST GGC
|
||||||
|
WHERE GGC.STDR_DE <![CDATA[<=]]> GO.ORDR_RCEPT_DT
|
||||||
|
)
|
||||||
|
WHERE 1 = 1
|
||||||
|
AND GOIO.ORDR_STTUS_CD = #{srchOrdrSttusCd}
|
||||||
|
AND GO.SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND <foreach collection="srchInnbPairs" item="pair" index="index" open="(" separator=" OR " close=")">
|
||||||
|
(
|
||||||
|
GOS.ORDR_INNB = #{pair.srchOrdrInnb}
|
||||||
|
AND GOS.ORDR_DLVY_INNB = #{pair.srchOrdrDlvyInnb}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
ORDER BY GOS.CSTMCLER_CD ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 엑셀 다운로드 일시 업데이트 -->
|
||||||
|
<update id="updateExcelDownDt" parameterType="com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrSrchVO">
|
||||||
|
UPDATE GC_ORDER_SHIPPING GOS
|
||||||
|
SET GOS.EXCEL_DOWN_DT = SYSDATE()
|
||||||
|
WHERE <foreach collection="srchInnbPairs" item="pair" index="index" open="(" separator=" OR " close=")">
|
||||||
|
(
|
||||||
|
GOS.ORDR_INNB = #{pair.srchOrdrInnb}
|
||||||
|
AND GOS.ORDR_DLVY_INNB = #{pair.srchOrdrDlvyInnb}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
<!--
|
||||||
|
####################################
|
||||||
|
관리자 > 주문 > 주문관리 > 발주서 관리 종료
|
||||||
|
####################################
|
||||||
|
-->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
####################################
|
####################################
|
||||||
관리자 > 주문 > 개인결제관리 시작
|
관리자 > 주문 > 개인결제관리 시작
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
fn_select_list(pageIndex, pageUnit);
|
fn_select_list(pageIndex, pageUnit);
|
||||||
//지정일
|
//지정일
|
||||||
fn_set_date('srchStrtSndngDt','srchEndSndngDt','srchEndSndngDㄴt');
|
fn_set_date('srchStrtSndngDt','srchEndSndngDt','srchEndSndngDt');
|
||||||
|
|
||||||
//날짜 선택 버튼 선택 처리
|
//날짜 선택 버튼 선택 처리
|
||||||
$(".dateRange-btnContainer").on("click", ".dateRange-btn", function(){
|
$(".dateRange-btnContainer").on("click", ".dateRange-btn", function(){
|
||||||
|
|||||||
@@ -464,26 +464,6 @@
|
|||||||
fn_go_ordr_dtstmn_dwld_popup(ordrInnbs)
|
fn_go_ordr_dtstmn_dwld_popup(ordrInnbs)
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
* 열 헤더 > 엑셀 발주서 다운로드 버튼 클릭 이벤트
|
|
||||||
*/
|
|
||||||
$(document).on('click', '.excel-dwld-purch-order', function() {
|
|
||||||
const srchStartDate = $('#srchStartDate').val();
|
|
||||||
const srchEndDate = $('#srchEndDate').val();
|
|
||||||
const srchOrdrSttusCd = '35';
|
|
||||||
|
|
||||||
var form = $('#condForm').clone().prop("id", "excelCondForm")
|
|
||||||
$(form).append($('<input/>', {type:'hidden', name:'srchOrdrSttusCd', value:srchOrdrSttusCd}));
|
|
||||||
|
|
||||||
$(form).attr('method', 'post');
|
|
||||||
$(form).attr('action', '<c:url value="/mngr/ordr/ordrmngr/selectExcelPoDwldListInqire"/>');
|
|
||||||
|
|
||||||
$(form).appendTo('body');
|
|
||||||
|
|
||||||
$(form).submit();
|
|
||||||
$(form).remove();
|
|
||||||
});
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 열 > 중요주문 버튼 클릭 이벤트
|
* 열 > 중요주문 버튼 클릭 이벤트
|
||||||
*/
|
*/
|
||||||
@@ -806,7 +786,7 @@
|
|||||||
|
|
||||||
header += ' <button type="button" class="btn-order-print-' + data.ordrSttusCd + ' btn outline xsm fs-13"><i class="icon icon_print"></i>프린트</button>';
|
header += ' <button type="button" class="btn-order-print-' + data.ordrSttusCd + ' btn outline xsm fs-13"><i class="icon icon_print"></i>프린트</button>';
|
||||||
if ('35' === data.ordrSttusCd) {
|
if ('35' === data.ordrSttusCd) {
|
||||||
header += ' <button type="button" class="btn sm outline fs-13 excel-dwld-purch-order">';
|
header += ' <button type="button" onclick="fn_select_dwld_purch_ordr_list()" class="btn sm outline fs-13">';
|
||||||
header += ' <i class="icon icon_excel"></i>발주서 다운로드';
|
header += ' <i class="icon icon_excel"></i>발주서 다운로드';
|
||||||
header += ' </button>';
|
header += ' </button>';
|
||||||
}
|
}
|
||||||
@@ -1404,7 +1384,7 @@
|
|||||||
}
|
}
|
||||||
footer += ' <button type="button" class="btn-order-print-' + data.ordrSttusCd + ' btn outline xsm fs-13"><i class="icon icon_print"></i>프린트</button>';
|
footer += ' <button type="button" class="btn-order-print-' + data.ordrSttusCd + ' btn outline xsm fs-13"><i class="icon icon_print"></i>프린트</button>';
|
||||||
if ('35' === prevOrderSttusCd) {
|
if ('35' === prevOrderSttusCd) {
|
||||||
footer += ' <button type="button" class="btn sm outline fs-13 excel-dwld-purch-order">';
|
footer += ' <button type="button" onclick="fn_select_dwld_purch_ordr_list()" class="btn sm outline fs-13">';
|
||||||
footer += ' <i class="icon icon_excel"></i>발주서 다운로드';
|
footer += ' <i class="icon icon_excel"></i>발주서 다운로드';
|
||||||
footer += ' </button>';
|
footer += ' </button>';
|
||||||
}
|
}
|
||||||
@@ -1738,8 +1718,6 @@
|
|||||||
$(form).submit();
|
$(form).submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* 다운로드 항목 목록 이동 */
|
/* 다운로드 항목 목록 이동 */
|
||||||
const fn_select_dwld_ordr_list = function() {
|
const fn_select_dwld_ordr_list = function() {
|
||||||
var form = $('#condForm')
|
var form = $('#condForm')
|
||||||
@@ -1753,9 +1731,17 @@
|
|||||||
$(form).submit();
|
$(form).submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 발주서 다운로드 항목 목록 이동 */
|
||||||
|
const fn_select_dwld_purch_ordr_list = function() {
|
||||||
|
var form = $('#condForm')
|
||||||
|
|
||||||
|
$(form).find('input[name="ordrInnb"]').remove();
|
||||||
|
|
||||||
|
$(form).attr('method', 'post');
|
||||||
|
$(form).attr('action', '<c:url value="/mngr/ordr/ordrmngr/selectExcelPoListInqireRForm"/>');
|
||||||
|
|
||||||
|
$(form).submit();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -1785,6 +1771,7 @@
|
|||||||
<a type="button" onclick="fn_select_indvdl_setle_list();" class="btn outline">개인 결제 목록</a>
|
<a type="button" onclick="fn_select_indvdl_setle_list();" class="btn outline">개인 결제 목록</a>
|
||||||
<a href="<c:url value="/crm/ordr/selectMngrOrdrRegistForm"/>" class="btn outline" target='_blank'>관리자 주문 등록</a>
|
<a href="<c:url value="/crm/ordr/selectMngrOrdrRegistForm"/>" class="btn outline" target='_blank'>관리자 주문 등록</a>
|
||||||
<a type="button" onclick="fn_select_dwld_ordr_list();" class="btn outline">다운로드 항목설정 목록</a>
|
<a type="button" onclick="fn_select_dwld_ordr_list();" class="btn outline">다운로드 항목설정 목록</a>
|
||||||
|
<a type="button" onclick="fn_select_dwld_purch_ordr_list()" class="btn outline"><i class="icon icon_excel"></i>발주서 다운로드</a>
|
||||||
<button type="button" class="btn primary" onclick="fn_dlivy_procs_popup('/mngr/ordr/dlivy/selectOrdrDlivyPopupForm','팝업','1400','840', 'O');">출고처리</button>
|
<button type="button" class="btn primary" onclick="fn_dlivy_procs_popup('/mngr/ordr/dlivy/selectOrdrDlivyPopupForm','팝업','1400','840', 'O');">출고처리</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,533 @@
|
|||||||
|
<%@ 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="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||||
|
<spring:eval expression="@environment.getProperty('currency-unit.default')" var="curUnit"/>
|
||||||
|
<spring:eval expression="@environment.getProperty('currency-unit.KR')" var="krUnit"/>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<%@ include file="/WEB-INF/views/comm/mngr/Include.jsp"%>
|
||||||
|
<style>
|
||||||
|
@media print {
|
||||||
|
html, body {
|
||||||
|
height:auto;
|
||||||
|
width:auto;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.pbreak {
|
||||||
|
page-break-after: always;
|
||||||
|
}
|
||||||
|
.pbreak:last-child {
|
||||||
|
page-break-after: auto;
|
||||||
|
}
|
||||||
|
table.order_print_info tr th {
|
||||||
|
padding:3px 3px 3px 3px;
|
||||||
|
text-align:left;
|
||||||
|
font-size:11px;
|
||||||
|
color:#4d4d4d;
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
|
table.order_print_info tr td {
|
||||||
|
padding:3px 3px 3px 3px;
|
||||||
|
text-align:right;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
table.delivery_print_info {
|
||||||
|
border-collapse:collapse !important;
|
||||||
|
border:1px solid #bcbfc1;
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
table.delivery_print_info tr th {
|
||||||
|
padding:3px 3px 3px 3px;
|
||||||
|
font-size:11px;
|
||||||
|
color:#4d4d4d;
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
|
table.delivery_print_info tr td {
|
||||||
|
padding:3px 3px 3px 3px;
|
||||||
|
font-size:11px;
|
||||||
|
}
|
||||||
|
table.delivery_goods_print_info {
|
||||||
|
border-collapse:collapse !important;
|
||||||
|
border:1px solid #bcbfc1;
|
||||||
|
table-layout: fixed
|
||||||
|
}
|
||||||
|
table.delivery_goods_print_info tr th {
|
||||||
|
padding:3px 3px 3px 3px;
|
||||||
|
font-size:11px;
|
||||||
|
color:#4d4d4d;
|
||||||
|
font-weight:normal;
|
||||||
|
border-left:1px solid #bcbfc1;
|
||||||
|
border-top:1px solid #bcbfc1;
|
||||||
|
}
|
||||||
|
table.delivery_goods_print_info tr td {
|
||||||
|
padding:3px 3px 3px 3px;
|
||||||
|
font-size:11px;
|
||||||
|
border-left:1px solid #bcbfc1;
|
||||||
|
border-top:1px solid #bcbfc1;
|
||||||
|
}
|
||||||
|
span.title_print_info {
|
||||||
|
font-size:12px;
|
||||||
|
color:#000000;
|
||||||
|
font-weight:normal;
|
||||||
|
letter-spacing:-1px;
|
||||||
|
}
|
||||||
|
table.order-sale-summary tr.total-sale-title td {
|
||||||
|
font-size:14px !important;
|
||||||
|
font-weight:normal !important;
|
||||||
|
color:#000000 !important;
|
||||||
|
}
|
||||||
|
tr.detail-sale-summary td div {
|
||||||
|
padding:0px !important;
|
||||||
|
color:#000000 !important;
|
||||||
|
}
|
||||||
|
tr.detail-sale-summary td {
|
||||||
|
color:#000000 !important;
|
||||||
|
}
|
||||||
|
tr.detail-sale-summary td span {
|
||||||
|
padding:0px !important;
|
||||||
|
color:#000000;
|
||||||
|
}
|
||||||
|
tr.total-sale-title td span {
|
||||||
|
padding:0px !important;
|
||||||
|
color:#000000;
|
||||||
|
}
|
||||||
|
tr.detail-sale-summary td:last-child {
|
||||||
|
padding:0px !important;
|
||||||
|
color:#000000 !important;
|
||||||
|
font-weight:normal !important;
|
||||||
|
}
|
||||||
|
tr.detail-sale-summary td:last-child span {
|
||||||
|
padding:0px !important;
|
||||||
|
color:#000000 !important;
|
||||||
|
font-size:14px !important;
|
||||||
|
font-weight:normal !important;
|
||||||
|
}
|
||||||
|
span.unit-money {
|
||||||
|
display:inline-block;width:10px;
|
||||||
|
}
|
||||||
|
tr {
|
||||||
|
page-break-inside:avoid;
|
||||||
|
page-break-after:auto;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
page-break-inside:avoid;
|
||||||
|
page-break-after:auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
loding(false);
|
||||||
|
window.print();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="wrap">
|
||||||
|
<c:set var="ordrDtstmnDwlds" value="${data.ordrDtstmnDwldList}"/>
|
||||||
|
<c:forEach var="ordrDtstmnDwld" items="${ordrDtstmnDwlds}" varStatus="status">
|
||||||
|
<c:set var="shipping" value="${ordrDtstmnDwld.shipping}"/>
|
||||||
|
<c:set var="srchOrdrDlvyInnb" value="${ordrSrchVO.srchOrdrDlvyInnbs[status.index]}"/>
|
||||||
|
<c:set var="isLast" value="${ordrDtstmnDwlds.size() ne status.count}"/>
|
||||||
|
<div class="pbreak">
|
||||||
|
<div align="center">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span style="text-align:center;font-size:20px;letter-spacing:-1px;font-weight:bold;padding-top:20px;">
|
||||||
|
주문내역서
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div style="height:5px;"></div>
|
||||||
|
<table style="width:100%;">
|
||||||
|
<col style="width:48%;">
|
||||||
|
<col style="width:4%;">
|
||||||
|
<col style="width:48%;">
|
||||||
|
<tr>
|
||||||
|
<td><span class="title_print_info">주문정보</span></td>
|
||||||
|
<td></td>
|
||||||
|
<td><span class="title_print_info">결제정보</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><div style="width:100%;border-top:1px solid #545454;height:1px;"></div></td>
|
||||||
|
<td></td>
|
||||||
|
<td><div style="width:100%;border-top:1px solid #545454;height:1px;"></div></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<c:set var="ordr" value="${ordrDtstmnDwld.ordr}"/>
|
||||||
|
<c:set var="setle" value="${ordrDtstmnDwld.setle}"/>
|
||||||
|
<table class="order_print_info" style="width:100%;">
|
||||||
|
<tr>
|
||||||
|
<th>주문번호</th>
|
||||||
|
<td>${ordr.ordrInnb}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>주문일자</th>
|
||||||
|
<td>${ordr.ordrRceptDt}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>주문고객</th>
|
||||||
|
<td>${ordr.mbrNm}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>전화</th>
|
||||||
|
<td>${ordr.ordrrTelnb}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>휴대전화</th>
|
||||||
|
<td>${ordr.ordrrMbtlnb}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>이메일</th>
|
||||||
|
<td>${ordr.ordrrEmailAdres}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td valign="top">
|
||||||
|
<table class="order_print_info" style="width:100%;">
|
||||||
|
<tr>
|
||||||
|
<th>상품금액</th>
|
||||||
|
<td><fmt:formatNumber value="${setle.slepric}" pattern="#,###"/>${curUnit}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>배송비</th>
|
||||||
|
<td><fmt:formatNumber value="${setle.dlvyAmt}" pattern="#,###"/>${curUnit}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>할인</th>
|
||||||
|
<td><fmt:formatNumber value="${setle.dscntAmt}" pattern="#,###"/>${curUnit}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>총 결제금액</th>
|
||||||
|
<td>
|
||||||
|
<span style="font-size:12px;">
|
||||||
|
<fmt:formatNumber value="${setle.setleAmt}" pattern="#,###"/>${curUnit}
|
||||||
|
(<fmt:formatNumber value="${setle.wonRlSetleAmt}" pattern="#,###"/>${krUnit})
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>결제수단</th>
|
||||||
|
<td>${ordr.setleTyNm}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div style="height:10px"></div>
|
||||||
|
<table align="center" style="width:100%;">
|
||||||
|
<tr>
|
||||||
|
<td class="left"><span class="title_print_info">주문상품 (${ordr.itemCnt}종 - 총 ${ordr.orderCnt}개)</span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div style="height:3px"></div>
|
||||||
|
<c:set var="goodsList" value="${ordrDtstmnDwld.goods}"/>
|
||||||
|
<c:if test="${not empty goodsList}">
|
||||||
|
<table class="delivery_goods_print_info" align="center" style="width:100%; ${status.count > 1 ? 'margin-top:5px;' : '' }">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width:auto;">
|
||||||
|
<col style="width:50px;">
|
||||||
|
<col style="width:35px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:35px;">
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
<th>상품명</th>
|
||||||
|
<th>순번</th>
|
||||||
|
<th>주문</th>
|
||||||
|
<th>판매가</th>
|
||||||
|
<th>할인</th>
|
||||||
|
<th>할인가(단가)</th>
|
||||||
|
<th>적립</th>
|
||||||
|
<th>배송</th>
|
||||||
|
<th>취소</th>
|
||||||
|
</tr>
|
||||||
|
<c:forEach var="goods" items="${goodsList}" varStatus="status">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table style="border:0px">
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:11px;border:0px;">
|
||||||
|
${goods.goodsNm}
|
||||||
|
<c:if test="${not empty goods.optnNm}">
|
||||||
|
<div style="padding:2px 0px 0px 0px;">- ${goods.optnNm}</div>
|
||||||
|
</c:if>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td class="right">
|
||||||
|
<c:forEach var="ship" items="${shipping}" varStatus="status">
|
||||||
|
<c:if test="${ship.ordrDlvyInnb == goods.ordrDlvyInnb}">
|
||||||
|
${status.count}번째
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.ordrQy}" pattern="#,###"/></td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.slepric}" pattern="#,###"/>${curUnit}</td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.dscntAmt}" pattern="#,###"/>${curUnit}</td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.applyDscntAmt}" pattern="#,###"/>${curUnit}<br/>(<fmt:formatNumber value="${goods.slepric}" pattern="#,###"/>${curUnit})</td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.mlgAmt}" pattern="#,###"/></td>
|
||||||
|
<td class="right">
|
||||||
|
<div><span>${goods.dlvyMthNm}</span></div>
|
||||||
|
<div><span class="bold"><fmt:formatNumber value="${goods.dlvyAmt}" pattern="#,###"/>${curUnit}</span></div>
|
||||||
|
</td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.setleCanclQy}" pattern="#,###"/></td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</table>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${empty goodsList}">
|
||||||
|
<table class="delivery_goods_print_info" align="center" style="width:100%;">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width:auto;">
|
||||||
|
<col style="width:50px;">
|
||||||
|
<col style="width:35px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:35px;">
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
<th>상품명</th>
|
||||||
|
<th>순번</th>
|
||||||
|
<th>주문</th>
|
||||||
|
<th>판매가</th>
|
||||||
|
<th>할인</th>
|
||||||
|
<th>할인가(단가)</th>
|
||||||
|
<th>적립</th>
|
||||||
|
<th>배송</th>
|
||||||
|
<th>취소</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="text-align: center">조회된 데이터가 없습니다.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</c:if>
|
||||||
|
<div style="height:10px"></div>
|
||||||
|
<div>
|
||||||
|
<table style="width:100%;">
|
||||||
|
<tr>
|
||||||
|
<td><span class="title_print_info">배송정보</span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<c:if test="${not empty shipping}">
|
||||||
|
<c:forEach var="ship" items="${shipping}" varStatus="status">
|
||||||
|
<c:if test="${srchOrdrDlvyInnb eq ship.ordrDlvyInnb}">
|
||||||
|
<table class="delivery_goods_print_info" style="width:100%; ${status.count > 1 ? 'margin-top:5px;' : '' }">
|
||||||
|
<col style="width:5%;">
|
||||||
|
<col style="width:20%;">
|
||||||
|
<col style="width:20%;">
|
||||||
|
<col style="width:20%;">
|
||||||
|
<tr align="left">
|
||||||
|
<td rowspan="3">${status.count}번째</td>
|
||||||
|
<td>${ship.recpntNm}</td>
|
||||||
|
<td>${ship.recpntMbtlnb}</td>
|
||||||
|
<td>${ship.recpntTelnb}</td>
|
||||||
|
</tr>
|
||||||
|
<tr align="left">
|
||||||
|
<td colspan="3">
|
||||||
|
${not empty ship.dlvylcZip ? '(' += ship.dlvylcZip += ')' : ''}
|
||||||
|
${ship.adres}
|
||||||
|
${ship.dlvylcAdresDtl}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr align="left">
|
||||||
|
<td colspan="3">
|
||||||
|
<c:if test="${empty ship.dlvyMssageCn}">
|
||||||
|
-
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${not empty ship.dlvyMssageCn}">
|
||||||
|
${ship.dlvyMssageCn}
|
||||||
|
</c:if>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${empty shipping}">
|
||||||
|
<table class="delivery_goods_print_info" style="width:100%; ${status.count > 1 ? 'margin-top:5px;' : '' }">
|
||||||
|
<col style="width:5%;">
|
||||||
|
<col style="width:20%;">
|
||||||
|
<col style="width:20%;">
|
||||||
|
<col style="width:20%;">
|
||||||
|
<tr><td colspan="9" style="text-align: center">조회된 데이터가 없습니다.</td></tr>
|
||||||
|
</table>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
<div style="height:10px"></div>
|
||||||
|
<table align="center" style="width:100%;">
|
||||||
|
<tr>
|
||||||
|
<td class="left"><span class="title_print_info">발송상품</span></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div style="height:3px"></div>
|
||||||
|
<c:set var="goodsList" value="${ordrDtstmnDwld.goods}"/>
|
||||||
|
<c:if test="${not empty goodsList}">
|
||||||
|
<table class="delivery_goods_print_info" align="center" style="width:100%; ${status.count > 1 ? 'margin-top:5px;' : '' }">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width:auto;">
|
||||||
|
<col style="width:35px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:35px;">
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
<th>상품명</th>
|
||||||
|
<th>주문</th>
|
||||||
|
<th>판매가</th>
|
||||||
|
<th>할인</th>
|
||||||
|
<th>할인가(단가)</th>
|
||||||
|
<th>적립</th>
|
||||||
|
<th>취소</th>
|
||||||
|
<th>발송</th>
|
||||||
|
</tr>
|
||||||
|
<c:forEach var="goods" items="${goodsList}" varStatus="status">
|
||||||
|
<c:if test="${srchOrdrDlvyInnb eq goods.ordrDlvyInnb}">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table style="border:0px">
|
||||||
|
<tr>
|
||||||
|
<td style="font-size:11px;border:0px;">
|
||||||
|
${goods.goodsNm}
|
||||||
|
<div style="padding:2px 0px 0px 0px;">- ${goods.optnNm}</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.ordrQy}" pattern="#,###"/></td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.slepric}" pattern="#,###"/>${curUnit}</td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.dscntAmt}" pattern="#,###"/>${curUnit}</td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.applyDscntAmt}" pattern="#,###"/>${curUnit}<br/>(<fmt:formatNumber value="${goods.slepric}" pattern="#,###"/>${curUnit})</td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.mlgAmt}" pattern="#,###"/></td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.setleCanclQy}" pattern="#,###"/></td>
|
||||||
|
<td class="right"><fmt:formatNumber value="${goods.sndngQy}" pattern="#,###"/></td>
|
||||||
|
</tr>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</table>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${empty goodsList}">
|
||||||
|
<table class="delivery_goods_print_info" align="center" style="width:100%;">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width:auto;">
|
||||||
|
<col style="width:50px;">
|
||||||
|
<col style="width:35px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:70px;">
|
||||||
|
<col style="width:35px;">
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
<th>상품명</th>
|
||||||
|
<th>배송지</th>
|
||||||
|
<th>주문</th>
|
||||||
|
<th>판매가</th>
|
||||||
|
<th>할인</th>
|
||||||
|
<th>할인가(단가)</th>
|
||||||
|
<th>적립</th>
|
||||||
|
<th>배송</th>
|
||||||
|
<th>취소</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="9" style="text-align: center">조회된 데이터가 없습니다.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</c:if>
|
||||||
|
<%--<div style="height:5px;"></div>
|
||||||
|
<table align="center" style="width:696px;">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width:20%;">
|
||||||
|
<col>
|
||||||
|
<col style="width:20%;">
|
||||||
|
<col>
|
||||||
|
<col style="width:20%;">
|
||||||
|
<col>
|
||||||
|
<col style="width:20%;">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right;font-size:12px;">
|
||||||
|
<span>총 상품금액</span>
|
||||||
|
</td>
|
||||||
|
<td style="text-align:center;font-size:12px;"><span>+</span></td>
|
||||||
|
<td style="text-align:right;font-size:12px;">
|
||||||
|
<span>배송비</span>
|
||||||
|
</td>
|
||||||
|
<td style="text-align:center;font-size:12px;"><span>-</span></td>
|
||||||
|
<td style="text-align:right;font-size:12px;">
|
||||||
|
<span>할인<span> <fmt:formatNumber value="${setle.dscntAmt}" pattern="#,###"/>${curUnit}</span></span>
|
||||||
|
</td>
|
||||||
|
<td style="text-align:center;font-size:12px;"><span>=</span></td>
|
||||||
|
<td style="text-align:right;font-size:12px;">
|
||||||
|
<span>총 결제금액</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right;font-size:11px;">
|
||||||
|
<span><fmt:formatNumber value="${setle.slepric}" pattern="#,###"/>${curUnit}</span>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td style="text-align:right;font-size:11px;">
|
||||||
|
<div>
|
||||||
|
<span><fmt:formatNumber value="${setle.dlvyAmt}" pattern="#,###"/>${curUnit}</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td style="text-align:right;font-size:11px;">
|
||||||
|
<c:set var="dscnts" value="${ordrDtstmnDwld.dscnt}"/>
|
||||||
|
<c:if test="${not empty dscnts}">
|
||||||
|
<c:forEach var="dscnt" items="${dscnts}" varStatus="status">
|
||||||
|
<div>${dscnt.dscntDvNm}:<span><fmt:formatNumber value="${dscnt.dscntAmt}" pattern="#,###"/>${curUnit}</span></div>
|
||||||
|
</c:forEach>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${empty dscnts}">
|
||||||
|
<div><span>0${curUnit}</span></div>
|
||||||
|
</c:if>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td style="text-align:right;font-size:12px;">
|
||||||
|
<span>
|
||||||
|
<fmt:formatNumber value="${setle.setleAmt}" pattern="#,###"/>${curUnit}
|
||||||
|
(<fmt:formatNumber value="${setle.wonRlSetleAmt}" pattern="#,###"/>${krUnit})
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>--%>
|
||||||
|
</div>
|
||||||
|
<c:if test="${isLast}">
|
||||||
|
<div style="height:50px"></div>
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
<%@ 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="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<%--
|
||||||
|
Class Name : PurchOrdrListInqireR.jsp
|
||||||
|
Description : 발주서 대상 목록 조회
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2026-07-15 이대환 최초 생성
|
||||||
|
--%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
<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="pageUnit" id="pageUnit" onchange="fn_select_list(1);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 type="button" class="btn outline sm" onclick="fn_ordrdtstmn_print();">
|
||||||
|
<i class="icon icon_print"></i>프린트
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn outline sm" onclick="fn_excel_download();">
|
||||||
|
<i class="icon icon_excel"></i>발주서 다운로드
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="center"></div>
|
||||||
|
<div class="right"></div>
|
||||||
|
</div>
|
||||||
|
<hr class="spacing">
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table class="table vertical">
|
||||||
|
<caption>회원 목록</caption>
|
||||||
|
<!-- 각 열 width 설정 -->
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 4%;">
|
||||||
|
<col style="width: 10%;">
|
||||||
|
<col style="width: 12%;">
|
||||||
|
<col style="width: 6%;">
|
||||||
|
<col style="width: 8%;">
|
||||||
|
<col style="width: auto;">
|
||||||
|
<col style="width: auto;">
|
||||||
|
<col style="width: 6%;">
|
||||||
|
<col style="width: auto;">
|
||||||
|
<col style="width: 6%;">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<label class="b-checkbox checkbox is-medium check-all" id="chkALabel">
|
||||||
|
<input type="checkbox" id="chkA">
|
||||||
|
<span class="check"></span>
|
||||||
|
</label>
|
||||||
|
</th>
|
||||||
|
<th>엑셀 다운일</th>
|
||||||
|
<th>주문번호</th>
|
||||||
|
<th>배송번호</th>
|
||||||
|
<th>수취인</th>
|
||||||
|
<th>수취인 TEL</th>
|
||||||
|
<th>개인통관부호</th>
|
||||||
|
<th>우편번호</th>
|
||||||
|
<th>내용물</th>
|
||||||
|
<th>Unit Value</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<c:choose>
|
||||||
|
<c:when test="${not empty resultMap.resultList}">
|
||||||
|
<c:forEach var="resultList" items="${resultMap.resultList}">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="b-checkbox checkbox is-medium">
|
||||||
|
<input type="checkbox" value="${resultList.ordrInnb}/${resultList.ovseaSelerRegistCd}" class="chk" name="purchOrdrPK">
|
||||||
|
<span class="check"></span>
|
||||||
|
</label>
|
||||||
|
<input type="hidden" class="cstmclerCd" value="${resultList.cstmclerCd}">
|
||||||
|
</td>
|
||||||
|
<td><c:out value="${resultList.excelDownDt}"/></td>
|
||||||
|
<td><c:out value="${resultList.ordrInnb}"/></td>
|
||||||
|
<td><c:out value="${resultList.ovseaSelerRegistCd}"/></td>
|
||||||
|
<td><c:out value="${resultList.recpntNm}"/></td>
|
||||||
|
<td><c:out value="${resultList.recpntMbtlnb}"/></td>
|
||||||
|
<td><c:out value="${resultList.cstmclerCd}"/></td>
|
||||||
|
<td><c:out value="${resultList.dlvylcZip}"/></td>
|
||||||
|
<td><c:out value="${resultList.cn}"/></td>
|
||||||
|
<td><c:out value="${resultList.unitValue}"/></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 mt-30">
|
||||||
|
<input type="hidden" id="pageIndex" name="pageIndex" value="${ ordrSrchVO.pageIndex}"/>
|
||||||
|
<ui:pagination paginationInfo="${resultMap.paginationInfo}" type="image" jsFunction="fn_select_list"/>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,320 @@
|
|||||||
|
<%@ 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="ui" uri="http://www.winbit.kr/ctl/ui" %>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<%--
|
||||||
|
Class Name : PurchOrdrListInqireRForm.jsp
|
||||||
|
Description : 발주서 관리 폼
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2026-07-15 이대환 최초 생성
|
||||||
|
--%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
<head>
|
||||||
|
<%-- 공통 include --%>
|
||||||
|
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function(){
|
||||||
|
//form메소드에서 pageIndex, pageUnit 갖고옴
|
||||||
|
let pageIndex = '<c:out value="${ ordrSrchVO.pageIndex }"/>';
|
||||||
|
<%--let pageUnit = '<c:out value="${ ordrSrchVO.pageUnit }"/>';--%>
|
||||||
|
let pageUnit = 100;
|
||||||
|
|
||||||
|
fn_select_list(pageIndex, pageUnit);
|
||||||
|
|
||||||
|
//검색 버튼 클릭
|
||||||
|
$('#btnSearch').on('click', function(){
|
||||||
|
fn_select_list(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
/* ********************************************************
|
||||||
|
* 발주서 목록 조회
|
||||||
|
******************************************************** */
|
||||||
|
const fn_select_list = function(pageIndex, pageUnit) {
|
||||||
|
let dataStr;
|
||||||
|
if(!pageIndex) {
|
||||||
|
$('#pageIndex').val(1);
|
||||||
|
} else {
|
||||||
|
$('#pageIndex').val(pageIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 : '/mngr/ordr/ordrmngr/selectExcelPoListInqire',
|
||||||
|
data : dataStr,
|
||||||
|
success:function(resultHtml) {
|
||||||
|
$('#pageDiv').html(resultHtml);
|
||||||
|
$('#pageUnit').niceSelect();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ********************************************************
|
||||||
|
* 발주서 주문내역서 프린트
|
||||||
|
******************************************************** */
|
||||||
|
const fn_ordrdtstmn_print = function () {
|
||||||
|
const checkedBoxes = $('input[name="purchOrdrPK"]:checked');
|
||||||
|
|
||||||
|
if (checkedBoxes.length === 0) {
|
||||||
|
alert('선택값이 없습니다.');
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let srchOrdrInnbs = [];
|
||||||
|
let srchOrdrDlvyInnbs = [];
|
||||||
|
|
||||||
|
$(checkedBoxes).each(function(idx, item) {
|
||||||
|
const split = $(item).val().split('/');
|
||||||
|
srchOrdrInnbs.push(split[0]);
|
||||||
|
srchOrdrDlvyInnbs.push(split[1]);
|
||||||
|
});
|
||||||
|
|
||||||
|
const title = 'orderPrint';
|
||||||
|
fn_open_center_popup(title, '900', '700');
|
||||||
|
|
||||||
|
var tempForm = $('<form>', {
|
||||||
|
target: title,
|
||||||
|
method: 'post',
|
||||||
|
action: '/mngr/ordr/ordrmngr/selectPurchOrdrDtstmnDwldPopupForm'
|
||||||
|
});
|
||||||
|
|
||||||
|
$.each(srchOrdrInnbs, function(key, value) {
|
||||||
|
$('<input>', {
|
||||||
|
type: 'hidden',
|
||||||
|
name: 'srchOrdrInnbs',
|
||||||
|
value: value
|
||||||
|
}).appendTo(tempForm);
|
||||||
|
});
|
||||||
|
$.each(srchOrdrDlvyInnbs, function(key, value) {
|
||||||
|
$('<input>', {
|
||||||
|
type: 'hidden',
|
||||||
|
name: 'srchOrdrDlvyInnbs',
|
||||||
|
value: value
|
||||||
|
}).appendTo(tempForm);
|
||||||
|
});
|
||||||
|
tempForm.appendTo('body');
|
||||||
|
console.log(tempForm.prop('outerHTML'));
|
||||||
|
|
||||||
|
tempForm.submit();
|
||||||
|
tempForm.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 발주서 엑셀다운로드
|
||||||
|
* */
|
||||||
|
const fn_excel_download = function () {
|
||||||
|
const checkedBoxes = $('input[name="purchOrdrPK"]:checked');
|
||||||
|
|
||||||
|
if (checkedBoxes.length === 0) {
|
||||||
|
alert('선택값이 없습니다.');
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let cstmclerCds = [];
|
||||||
|
let srchOrdrInnbs = [];
|
||||||
|
let srchOrdrDlvyInnbs = [];
|
||||||
|
|
||||||
|
$(checkedBoxes).each(function(idx, item) {
|
||||||
|
const cstmclerCd = $(this).closest('td').find('.cstmclerCd').val();
|
||||||
|
cstmclerCds.push(cstmclerCd);
|
||||||
|
|
||||||
|
const split = $(item).val().split('/');
|
||||||
|
srchOrdrInnbs.push(split[0]);
|
||||||
|
srchOrdrDlvyInnbs.push(split[1]);
|
||||||
|
});
|
||||||
|
|
||||||
|
const duplicate = new Set(cstmclerCds).size !== cstmclerCds.length;
|
||||||
|
if(duplicate) {
|
||||||
|
alert('개인통관부호가 중복되었습니다.')
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var tempForm = $('<form>', {
|
||||||
|
method: 'post',
|
||||||
|
action: '/mngr/ordr/ordrmngr/selectExcelPoDwldListInqire'
|
||||||
|
});
|
||||||
|
|
||||||
|
$.each(srchOrdrInnbs, function(key, value) {
|
||||||
|
$('<input>', {
|
||||||
|
type: 'hidden',
|
||||||
|
name: 'srchOrdrInnbs',
|
||||||
|
value: value
|
||||||
|
}).appendTo(tempForm);
|
||||||
|
});
|
||||||
|
$.each(srchOrdrDlvyInnbs, function(key, value) {
|
||||||
|
$('<input>', {
|
||||||
|
type: 'hidden',
|
||||||
|
name: 'srchOrdrDlvyInnbs',
|
||||||
|
value: value
|
||||||
|
}).appendTo(tempForm);
|
||||||
|
});
|
||||||
|
tempForm.appendTo('body');
|
||||||
|
|
||||||
|
tempForm.submit();
|
||||||
|
tempForm.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* open popup */
|
||||||
|
const fn_open_center_popup = function (title, w, h) {
|
||||||
|
const dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left;
|
||||||
|
const dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top;
|
||||||
|
|
||||||
|
const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
|
||||||
|
const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
|
||||||
|
|
||||||
|
const left = ((width / 2) - (w / 2)) + dualScreenLeft;
|
||||||
|
const top = ((height / 2) - (h / 2)) + dualScreenTop;
|
||||||
|
|
||||||
|
window.open('', title, 'scrollbars=yes, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 체크박스 전체 처리
|
||||||
|
* */
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 테이블 체크박스 전체 선택
|
||||||
|
$(document).on("click", "#chkA", function () {
|
||||||
|
if($(this).is(':checked')){
|
||||||
|
$(".chk").prop('checked', true);
|
||||||
|
}else{
|
||||||
|
$(".chk").prop('checked', false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 목록에서 체크 해제시 전체 체크박스 해제 및 목록 항목 전체 체크 시 전체체크 버튼 true
|
||||||
|
$(document).on("click", ".chk", function () {
|
||||||
|
let length = $(".chk").length;
|
||||||
|
let chcedLen = $(".chk:checked").length;
|
||||||
|
if (length == chcedLen) {
|
||||||
|
$("#chkA").prop('checked', true);
|
||||||
|
}else{
|
||||||
|
$("#chkA").prop('checked', false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%-- 상단메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||||
|
<%@include file ="/WEB-INF/views/comm/mngr/Header.jsp" %>
|
||||||
|
<main class="main">
|
||||||
|
<%-- 좌측메뉴 공통화 적용 : 2023-11-30 / 박철민 추가 --%>
|
||||||
|
<%@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>
|
||||||
|
<form id="listForm">
|
||||||
|
<section class="content-section">
|
||||||
|
<span class="red-7">*검색어는 정확히 입력해주세요</span>
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<table class="table">
|
||||||
|
<caption>발주서 대상 검색</caption>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: 12%;">
|
||||||
|
<col>
|
||||||
|
</colgroup>
|
||||||
|
<tr>
|
||||||
|
<th>배송지</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<div class="b-checkbox-container">
|
||||||
|
<label class="b-checkbox checkbox check-all">
|
||||||
|
<input id="dlvylcAreaCds-all" type="checkbox" onclick="fn_change_event('dlvylcAreaCds', 'all');">
|
||||||
|
<span class="check"></span>
|
||||||
|
<span class="control-label">전체</span>
|
||||||
|
</label>
|
||||||
|
<c:forEach items="${nationCdList}" var="nationCd" varStatus="status">
|
||||||
|
<label class="b-checkbox checkbox">
|
||||||
|
<input type="checkbox" name="dlvylcAreaCds" value="${nationCd.cd}"onclick="fn_change_event('dlvylcAreaCds', 'other');" <c:if test="${nationCd.cd eq 'KR'}">checked</c:if>>
|
||||||
|
<span class="check"></span>
|
||||||
|
<span class="control-label">${nationCd.cdNm}</span>
|
||||||
|
</label>
|
||||||
|
</c:forEach>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>엑셀다운 포함 여부</th>
|
||||||
|
<td>
|
||||||
|
<div class="td-inner">
|
||||||
|
<div class="custom-radio-container">
|
||||||
|
<div class="custom-radio">
|
||||||
|
<input type="radio" id="excelIncY" name="excelInclude" value="Y">
|
||||||
|
<label for="excelIncY">포함</label>
|
||||||
|
</div>
|
||||||
|
<div class="custom-radio">
|
||||||
|
<input type="radio" id="excelIncN" name="excelInclude" value="N" checked>
|
||||||
|
<label for="excelIncN">미포함</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="form-control-container">
|
||||||
|
<div class="left"></div>
|
||||||
|
<div class="center">
|
||||||
|
<button type="button" class="btn outline" id="btnResetForm">
|
||||||
|
<spring:message code="button.init"/>
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn primary" id="btnSearch">
|
||||||
|
<spring:message code="button.search"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<div id="pageDiv"></div>
|
||||||
|
</form>
|
||||||
|
<button class="scroll-to-top"><span class="visually-hidden">위로가기</span></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<div id = "modalDiv"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user