Compare commits

..

39 Commits
dev ... main

Author SHA1 Message Date
Jonguk. Lim 3d4708862f fix: logback log 경로 설정 변경 2 weeks ago
Jonguk. Lim 03b89664f8 fix: logback log 경로 설정 변경 2 weeks ago
Jonguk. Lim 8f4a618045 fix: 폐기결과보고서 출력시 최소유통단위 값 변경
: 최소유통단위 -> 낱개단위수량으로 변경
       (필드명은 유지 하고, 값만 변경)
2 weeks ago
Jonguk. Lim 82acc8f3bf fix: 그리드 항목 순서 및 정렬 조건 fix 3 weeks ago
Jonguk. Lim 78c367a79a doc: 메뉴얼 추가 3 weeks ago
Jonguk. Lim 13b53e7f43 fix: 보고문서관리 필드 및 정렬 조건 fix 3 weeks ago
Jonguk. Lim 3dc2c20df9 fix: 제품조회 팝업 fix
- 시리얼번호 select box css
    - API 업체코드 적용 변경시 시리얼번호 조회하도록 반영
3 weeks ago
Jonguk. Lim 8a00588664 fix: 폐기결과 팝업
-> 폐기구분 활성/비활성 반영
4 weeks ago
이범준 54824cbb52 폐기신청서 접수 상세화면 저장 오류 수정 4 weeks ago
Jonguk. Lim 176e0732cd fix: 폐기보고통계 - 제품 구분별 현황
-> 마약/향정 구분의 기타
     -> 상세 조회 팝업의 SQL 오류 fix
        -> '기타' => IS NULL로 변경
4 weeks ago
Jonguk. Lim 1bb342c2cc feat: 폐기 결과 처리 팝업의 폐기 장소 처리
-> 신규 입력의 경우 기 등록 폐기 장소로 set
4 weeks ago
Jonguk. Lim 8b078e28c7 feat: 업체 및 제품 검색 데이타 NO 추가 4 weeks ago
Jonguk. Lim f03fa678a6 feat: 폐기결과처리시 폐기장소 set 및 조회시 값 set 4 weeks ago
Jonguk. Lim b2f1087cb4 feat: 폐기결과 처리시 기등록 체크에 폐기구분 추가 4 weeks ago
Jonguk. Lim 9359896fc2 feat: 제품검색 팝업 신규 API 적용/미적용 선택 가능하도록 반영 4 weeks ago
Jonguk. Lim 4f7bf7a7af feat: 업체조회 팝업 페이징 적용
업체조회 팝업 조건 유효성 체크 추가
      제품검색 팝업 페이징 적용
      제품조회 팝업 조건 유효성 체크 추가
4 weeks ago
Jonguk. Lim 2b7b836b1f feat: 업체조회 팝업 페이징 적용
업체조회 팝업 조건 유효성 체크 추가
      제품검색 팝업 페이징 적용
      제품조회 팝업 조건 유효성 체크 추가
4 weeks ago
Jonguk. Lim b1995da72e feat: 일련번호 조회(seqinfo_pub) API 적용
제품조회 반영(업체의 제품 조회 되도록)
1 month ago
Jonguk. Lim 98546af7a3 Merge branch 'main' into main-prdAndseq-api-feat
# Conflicts:
#	src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-edit.jsp
#	src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp
1 month ago
이범준 402ae1d68b dataset.onAppend 수정 1 month ago
Jonguk. Lim c47a7c9b1c feat: 일련번호 조회(seqinfo_pub) API 적용
제품조회 반영(업체의 제품 조회 되도록)
1 month ago
Jonguk. Lim 0259c17ea6 Merge branch 'refs/heads/main' into main-prdAndseq-api-feat 1 month ago
이범준 5c2277767d datasetControl.setData 사용오류 수정 1 month ago
Jonguk. Lim 03bb9be2a3 Merge branch 'main' into main-prdAndseq-api-feat 1 month ago
이범준 6ed0433fd0 pom.xml 수정 2 months ago
Jonguk. Lim a11ceea450 feat: 일련번호 조회(seqinfo_pub) API 적용
제품조회 반영(업체의 제품 조회 되도록)
3 months ago
mjkhan21 826a46e603 userControl 소스 동기화 3 months ago
이범준 4a2de2dc73 help함수 추가 3 months ago
이범준 c9e574b178 js파일명 변경 3 months ago
이범준 1abaa3fd35 no message 3 months ago
이범준 7e1985358e 소스 정리 3 months ago
이범준 9f3d65c5c9 날짜 관련 자바스크립트 소스 리팩토링 3 months ago
이범준 20ec29eaef 공통함수, 문자열 관련 자바스크립트 소스 리팩토링 3 months ago
이범준 a089689c9c datepicker 관련 자바스크립트 소스 리팩토링 3 months ago
이범준 e1644c16ff 파일 처리 관련 자바스크립트 소스 리팩토링 3 months ago
이범준 b88495562c 테이블 관련 자바스크립트 소스 리팩토링 3 months ago
Jonguk. Lim c2e1303b97 fix: Nims 폐기보고 확인 fix 3 months ago
Jonguk. Lim d30cddcd3e fix: 신청서접수시 폐기수량 소숫점 입력 가능하도록 반영 3 months ago
Jonguk. Lim 1cc52b6741 fix: 신청서접수시 폐기수량 소숫점 입력 가능하도록 반영 3 months ago

Binary file not shown.

Binary file not shown.

@ -69,13 +69,13 @@
<dependency> <dependency>
<groupId>cokr.xit.app</groupId> <groupId>cokr.xit.app</groupId>
<artifactId>app-support</artifactId> <artifactId>app-support-java</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cokr.xit.app</groupId> <groupId>cokr.xit.app</groupId>
<artifactId>app-support-res</artifactId> <artifactId>app-support-web</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>

@ -44,6 +44,16 @@ public class ApiUtil {
return rslt.body(); return rslt.body();
} }
public static <T> String callNimsApiFromJSON(String uri, T cls) {
HttpResponse<String> rslt = new WebClient().post(request -> {
request.contentType(WebClient.Request.ContentType.JSON);
request.uri(uri);
toData(request, cls);
System.out.println("request : " + request);
});
return rslt.body();
}
/** /**
* Object -> data * Object -> data
* @param request WebClient.Request * @param request WebClient.Request

@ -1,13 +1,10 @@
package cokr.xit.adds.cmm.model; package cokr.xit.adds.cmm.model;
import java.util.List; import java.util.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.*;
import org.springmodules.validation.bean.conf.loader.annotation.handler.NotEmpty;
import lombok.Builder; import lombok.*;
import lombok.Data;
import lombok.Setter;
/** /**
* <pre> * <pre>
@ -96,7 +93,7 @@ public class NimsApiRequest {
* true DB skip * true DB skip
* </pre> * </pre>
*/ */
private String dbSkipYn = "N"; //private String dbSkipYn = "N";
/** /**
* <pre> * <pre>
@ -152,6 +149,11 @@ public class NimsApiRequest {
*/ */
private String pn; private String pn;
/**
*
*/
private String bc;
/** /**
* <pre> * <pre>
* DB skip * DB skip
@ -160,7 +162,7 @@ public class NimsApiRequest {
* *
* </pre> * </pre>
*/ */
private String dbSkipYn = "N"; //private String dbSkipYn = "N";
/** /**
* <pre> * <pre>
@ -296,7 +298,12 @@ public class NimsApiRequest {
/** /**
* *
*/ */
private String prdValidDe; private String vd;
/**
*
*/
private String bc;
/** /**
* *

@ -1,13 +1,11 @@
package cokr.xit.adds.cmmn.hwp.format; package cokr.xit.adds.cmmn.hwp.format;
import java.util.List; import java.util.*;
import java.util.stream.IntStream; import java.util.stream.*;
import cokr.xit.applib.Print; import cokr.xit.applib.*;
import cokr.xit.applib.PrintOption; import cokr.xit.applib.hwp.format.*;
import cokr.xit.applib.hwp.format.HWPFormat; import cokr.xit.foundation.data.*;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
public class DisposeResultReport extends HWPFormat { public class DisposeResultReport extends HWPFormat {
@ -40,7 +38,8 @@ public class DisposeResultReport extends HWPFormat {
.set("제품정보-구분", one.string("nrcdSeNm")) .set("제품정보-구분", one.string("nrcdSeNm"))
.set("제품정보-제품명", one.string("prductNm")) .set("제품정보-제품명", one.string("prductNm"))
.set("제품정보-품목코드", one.string("prductCd")) .set("제품정보-품목코드", one.string("prductCd"))
.set("제품정보-최소유통단위", one.string("minDistbQy")+one.string("stdPackngStleNm")) // 낱개단위 수량으로 보여짐
.set("제품정보-최소유통단위", one.string("pceQy")+one.string("pceUnit"))
.set("제품정보-제조번호", one.string("mnfNo")) .set("제품정보-제조번호", one.string("mnfNo"))
.set("제품정보-유효기한", DataFormat.yyyy_mm_dd(one.string("prdValidDe"))) .set("제품정보-유효기한", DataFormat.yyyy_mm_dd(one.string("prdValidDe")))
.set("폐기량-수량", one.string("dsuseQy")+one.string("pceCoUnitNm")) .set("폐기량-수량", one.string("dsuseQy")+one.string("pceCoUnitNm"))

@ -1,6 +1,6 @@
package cokr.xit.adds.nims; package cokr.xit.adds.nims;
import cokr.xit.foundation.component.QueryRequest; import cokr.xit.foundation.component.*;
/** /**
* *
@ -14,6 +14,7 @@ public class DsuseMgtRsltQuery extends QueryRequest{
private String deptCd; // 부서 코드 private String deptCd; // 부서 코드
private String userId; // 사용자 ID private String userId; // 사용자 ID
private String dsuseMthCd; // 폐기 방법 코드 private String dsuseMthCd; // 폐기 방법 코드
private String dsuseSeCd; // 폐기 구분 코드
private String dsuseDe; // 폐기 일자 private String dsuseDe; // 폐기 일자
public String getDscdmngId() { public String getDscdmngId() {
@ -52,6 +53,15 @@ public class DsuseMgtRsltQuery extends QueryRequest{
return self(); return self();
} }
public String getDsuseSeCd() {
return ifEmpty(dsuseSeCd, () -> null);
}
public <T extends DsuseMgtRsltQuery> T setDsuseSeCd(String dsuseSeCd) {
this.dsuseSeCd = dsuseSeCd;
return self();
}
public String getDsuseDe() { public String getDsuseDe() {
return ifEmpty(dsuseDe, () -> null); return ifEmpty(dsuseDe, () -> null);
} }

@ -0,0 +1,33 @@
package cokr.xit.adds.nims;
import cokr.xit.foundation.component.QueryRequest;
/**
*
*/
public class DsuseProductAndSeqQuery extends QueryRequest{
private static final long serialVersionUID = 1L;
private String openPage; // 검색 폐기관리 id
private String bsshCd; // 검색 폐기관리 id
public String getOpenPage() {
return ifEmpty(openPage, () -> null);
}
public <T extends DsuseProductAndSeqQuery> T setOpenPage(String openPage) {
this.openPage = openPage;
return self();
}
public String getBsshCd() {
return ifEmpty(bsshCd, () -> null);
}
public <T extends DsuseProductAndSeqQuery> T setBsshCd(String bsshCd) {
this.bsshCd = bsshCd;
return self();
}
}

@ -1,78 +1,43 @@
package cokr.xit.adds.nims.web; package cokr.xit.adds.nims.web;
import java.io.ByteArrayOutputStream; import java.io.*;
import java.io.File; import java.net.*;
import java.io.IOException; import java.net.http.*;
import java.net.URI; import java.nio.charset.*;
import java.net.http.HttpClient; import java.text.*;
import java.net.http.HttpRequest; import java.util.*;
import java.net.http.HttpResponse; import java.util.stream.*;
import java.nio.charset.StandardCharsets;
import java.text.NumberFormat; import javax.annotation.*;
import java.util.ArrayList;
import java.util.HashMap; import org.apache.poi.hssf.util.*;
import java.util.List; import org.apache.poi.ss.usermodel.*;
import java.util.Map; import org.json.simple.*;
import java.util.Set; import org.springframework.beans.factory.annotation.*;
import java.util.UUID; import org.springframework.stereotype.*;
import java.util.stream.Collectors; import org.springframework.web.bind.annotation.*;
import java.util.stream.IntStream; import org.springframework.web.multipart.*;
import org.springframework.web.servlet.*;
import javax.annotation.Resource;
import com.fasterxml.jackson.core.type.*;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.CellStyle; import cokr.xit.adds.cmm.model.*;
import org.apache.poi.ss.usermodel.Font; import cokr.xit.adds.cmmn.hwp.format.*;
import org.apache.poi.ss.usermodel.HorizontalAlignment; import cokr.xit.adds.nims.*;
import org.apache.poi.ss.usermodel.VerticalAlignment; import cokr.xit.adds.nims.service.*;
import org.json.simple.JSONObject; import cokr.xit.applib.*;
import org.springframework.beans.factory.annotation.Value; import cokr.xit.applib.xls.*;
import org.springframework.stereotype.Controller; import cokr.xit.base.code.*;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.fasterxml.jackson.core.type.TypeReference;
import cokr.xit.adds.cmm.model.ApiBaseResponse;
import cokr.xit.adds.cmm.model.ApiUtil;
import cokr.xit.adds.cmm.model.DsuseMappingInfo;
import cokr.xit.adds.cmm.model.DsuseReceiptDtl;
import cokr.xit.adds.cmm.model.DsuseRsltInfo;
import cokr.xit.adds.cmm.model.NimsApiRequest;
import cokr.xit.adds.cmmn.hwp.format.DisposeProcessDetails;
import cokr.xit.adds.cmmn.hwp.format.DisposeResultReport;
import cokr.xit.adds.nims.ApiKeyQuery;
import cokr.xit.adds.nims.DsuseMgtDetailQuery;
import cokr.xit.adds.nims.DsuseMgtDocQuery;
import cokr.xit.adds.nims.DsuseMgtReceiptQuery;
import cokr.xit.adds.nims.DsuseMgtRsltQuery;
import cokr.xit.adds.nims.DsuseMgtStatisticsQuery;
import cokr.xit.adds.nims.service.AddsNimsService;
import cokr.xit.adds.nims.service.ApiKeyService;
import cokr.xit.adds.nims.service.DsuseMgtDocService;
import cokr.xit.adds.nims.service.DsuseMgtReceiptService;
import cokr.xit.applib.Print;
import cokr.xit.applib.PrintOption;
import cokr.xit.applib.xls.StyleMaker;
import cokr.xit.base.code.CommonCode;
import cokr.xit.base.docs.xls.CellDef;
import cokr.xit.base.docs.xls.Format; import cokr.xit.base.docs.xls.Format;
import cokr.xit.base.docs.xls.Style; import cokr.xit.base.docs.xls.*;
import cokr.xit.base.docs.xls.XLSWriter; import cokr.xit.base.file.*;
import cokr.xit.base.file.FileInfo; import cokr.xit.base.file.FileInfo.*;
import cokr.xit.base.file.FileInfo.Relation; import cokr.xit.base.file.service.*;
import cokr.xit.base.file.service.FileQuery; import cokr.xit.base.user.*;
import cokr.xit.base.file.service.FileService; import cokr.xit.base.user.service.*;
import cokr.xit.base.user.DepartmentQuery; import cokr.xit.base.web.*;
import cokr.xit.base.user.service.SigunguDepartmentService; import cokr.xit.foundation.data.*;
import cokr.xit.base.web.ApplicationController; import cokr.xit.foundation.web.*;
import cokr.xit.foundation.data.DataObject;
import cokr.xit.foundation.data.JSON;
import cokr.xit.foundation.web.WebClient;
@Controller @Controller
@RequestMapping( @RequestMapping(
@ -152,7 +117,7 @@ public class AddsNimsController extends ApplicationController {
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
@RequestMapping(value = "/dsuseMgtReceipt-list.do", name="신청서 접수 목록 조회") @RequestMapping(value = "/dsuseMgtReceipt-list.do", name="신청서 접수 목록 조회")
public ModelAndView getDsuseMgtReceiptList(DsuseMgtReceiptQuery query) { public ModelAndView getDsuseMgtReceiptList(DsuseMgtReceiptQuery query) {
query.setOrderBy("DSUSE_DE DESC, DSUSE_MTH_CD, DSCDMNG_ID"); query.setOrderBy("DSUSE_DE DESC, DSUSE_SE_CD, DSUSE_MTH_CD, DSCDMNG_ID");
setFetchSize(query); setFetchSize(query);
return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtReceiptService.getDsuseMgtReceiptList(query),"",""); return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtReceiptService.getDsuseMgtReceiptList(query),"","");
@ -242,7 +207,8 @@ public class AddsNimsController extends ApplicationController {
.setDscdmngId(dsuseRsltInfo.getDscdmngId()) .setDscdmngId(dsuseRsltInfo.getDscdmngId())
.setDeptCd(dsuseRsltInfo.getDeptCd()) .setDeptCd(dsuseRsltInfo.getDeptCd())
.setDsuseDe(dsuseRsltInfo.getDsuseDe().replaceAll("-", "")) .setDsuseDe(dsuseRsltInfo.getDsuseDe().replaceAll("-", ""))
.setDsuseMthCd(dsuseRsltInfo.getDsuseMthCd() .setDsuseMthCd(dsuseRsltInfo.getDsuseMthCd())
.setDsuseSeCd(dsuseRsltInfo.getDsuseSeCd()
) )
) )
) )
@ -305,7 +271,7 @@ public class AddsNimsController extends ApplicationController {
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
@RequestMapping(value = "dsuseMgtDoc-list.do", name="보고문서관리 목록 조회") @RequestMapping(value = "dsuseMgtDoc-list.do", name="보고문서관리 목록 조회")
public ModelAndView getDsuseMgtDocList(DsuseMgtDocQuery query) { public ModelAndView getDsuseMgtDocList(DsuseMgtDocQuery query) {
query.setOrderBy("dsuse_de DESC, dsuse_mth_cd, dscdmng_id"); query.setOrderBy("dsuse_de DESC, dsuse_se_cd, dsuse_mth_cd, dscdmng_id");
setFetchSize(query); setFetchSize(query);
return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtDocService.getDsuseMgtDocList(query),"",""); return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtDocService.getDsuseMgtDocList(query),"","");
@ -592,14 +558,15 @@ public class AddsNimsController extends ApplicationController {
} }
@RequestMapping(value = "/product-popup.do", name="마약류 제품 조회 팝업") @RequestMapping(value = "/product-popup.do", name="마약류 제품 조회 팝업")
public ModelAndView productPopup(String openPage) { public ModelAndView productPopup(DsuseProductAndSeqQuery query) {
ModelAndView mav = new ModelAndView("adds/nims/product-popup"); ModelAndView mav = new ModelAndView("adds/nims/product-popup");
return mav return mav
.addObject("pageName", "productMain") // View(jsp)에서 사용할 id 뒤에 붙일 suffix .addObject("pageName", "productPopup") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefix", "product") // prefix .addObject("infoPrefix", "product") // prefix
.addObject("infoPrefixUrl", "/adds/nims") // prefixUrl .addObject("infoPrefixUrl", "/adds/nims") // prefixUrl
.addObject("openPage", openPage); .addObject("openPage", query.getOpenPage())
.addObject("bsshCd", query.getBsshCd());
} }
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
// 마약류폐기보고 팝업 // 마약류폐기보고 팝업
@ -614,6 +581,12 @@ public class AddsNimsController extends ApplicationController {
return json.parse(rslt, new TypeReference<>() {}); return json.parse(rslt, new TypeReference<>() {});
} }
@RequestMapping(value = "/getNimsBsshInfoSt2.do", name="업체(마약류취급자) 검색", produces = "application/json;charset=UTF-8")
public @ResponseBody ApiBaseResponse<List<JSONObject>> getNimsBsshInfoSt2(@ModelAttribute NimsApiRequest.BsshInfoReq dto) {
String rslt = ApiUtil.callNimsApi(apiHost + bsshInfoEndpoint, dto);
return json.parse(rslt, new TypeReference<>() {});
}
@RequestMapping(value = "/getNimsProductInfoKd.do", name="제품 검색", produces = "application/json;charset=UTF-8") @RequestMapping(value = "/getNimsProductInfoKd.do", name="제품 검색", produces = "application/json;charset=UTF-8")
public @ResponseBody ApiBaseResponse<List<JSONObject>> getNimsProductInfoKd(@ModelAttribute NimsApiRequest.ProductInfoReq dto) { public @ResponseBody ApiBaseResponse<List<JSONObject>> getNimsProductInfoKd(@ModelAttribute NimsApiRequest.ProductInfoReq dto) {
String rslt = ApiUtil.callNimsApi(apiHost + productInfoEndpoint, dto); String rslt = ApiUtil.callNimsApi(apiHost + productInfoEndpoint, dto);
@ -704,7 +677,7 @@ public class AddsNimsController extends ApplicationController {
@RequestMapping(value = "/modifyMappingDsuseMgt.do", name="폐기보고 확인 정보 저장", produces = "application/json;charset=UTF-8") @RequestMapping(value = "/modifyMappingDsuseMgt.do", name="폐기보고 확인 정보 저장", produces = "application/json;charset=UTF-8")
public @ResponseBody ApiBaseResponse<List<JSONObject>> modifyMappingDsuseMgt(@ModelAttribute NimsApiRequest.DsuseMgtMappingReq dto) { public @ResponseBody ApiBaseResponse<List<JSONObject>> modifyMappingDsuseMgt(@ModelAttribute NimsApiRequest.DsuseMgtMappingReq dto) {
String rslt = ApiUtil.callNimsApi(apiHost + modifyMappingDsuseMgtEndpoint, dto); String rslt = ApiUtil.callNimsApiFromJSON(apiHost + modifyMappingDsuseMgtEndpoint, dto);
return json.parse(rslt, new TypeReference<>() {}); return json.parse(rslt, new TypeReference<>() {});
} }
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------

@ -21,7 +21,7 @@
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- .gz,.zip 등을 넣으면 자동 일자별 로그파일 압축 --> <!-- .gz,.zip 등을 넣으면 자동 일자별 로그파일 압축 -->
<fileNamePattern>${LOG_PATH}/${LOG_FILE}.%d{yyyy-MM-dd}_%i.log</fileNamePattern> <fileNamePattern>${LOG_PATH}/backup/${LOG_FILE}.%d{yyyy-MM-dd}_%i.log.gz</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>10MB</maxFileSize> <maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy> </timeBasedFileNamingAndTriggeringPolicy>
@ -36,6 +36,7 @@
<filter class="ch.qos.logback.classic.filter.LevelFilter"> <filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>error</level> <level>error</level>
<onMatch>ACCEPT</onMatch> <onMatch>ACCEPT</onMatch>
<!-- 다른 수준의 레벨은 기록하지 않는다.(상위 레벨도 기록 안함), 상위 수준의 레벨에 대한 기록을 원하면 ACCEPT 로 하면 기록된다. -->
<onMismatch>DENY</onMismatch> <onMismatch>DENY</onMismatch>
</filter> </filter>
@ -46,13 +47,13 @@
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- .gz,.zip 등을 넣으면 자동 일자별 로그파일 압축 --> <!-- .gz,.zip 등을 넣으면 자동 일자별 로그파일 압축 -->
<fileNamePattern>${LOG_PATH}/${LOG_FILE}-error.%d{yyyy-MM-dd}_%i.log</fileNamePattern> <fileNamePattern>${LOG_PATH}/backup/${LOG_FILE}-error.%d{yyyy-MM-dd}_%i.log.gz</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- 파일당 최고 용량 kb, mb, gb --> <!-- 파일당 최고 용량 kb, mb, gb -->
<maxFileSize>10MB</maxFileSize> <maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy> </timeBasedFileNamingAndTriggeringPolicy>
<!-- 일자별 로그파일 최대 보관주기(~일), 해당 설정일 이상된 파일은 자동으로 제거--> <!-- 일자별 로그파일 최대 보관주기(~일), 해당 설정일 이상된 파일은 자동으로 제거-->
<maxHistory>60</maxHistory> <maxHistory>30</maxHistory>
</rollingPolicy> </rollingPolicy>
</appender> </appender>
@ -67,6 +68,8 @@
<logger name="com.zaxxer" level="OFF" additivity="false"/> <logger name="com.zaxxer" level="OFF" additivity="false"/>
<logger name="jdbc.sqltiming" level="DEBUG" /> <logger name="jdbc.sqltiming" level="DEBUG" />
<logger name="org.quartz" level="Error" additivity="false"/> <logger name="org.quartz" level="Error" additivity="false"/>
<!-- jndi log level 변경 : spring.liveBeansView.mbeanDomain 에러 -->
<logger name="org.springframework.jndi" level="WARN"/>
<!-- 특정패키지 로깅레벨 설정 --> <!-- 특정패키지 로깅레벨 설정 -->
<!-- <logger name="cokr.xit" level="DEBUG" additivity="false">--> <!-- <logger name="cokr.xit" level="DEBUG" additivity="false">-->

@ -10,6 +10,8 @@
, tdm.DSUSE_MTH_CD , tdm.DSUSE_MTH_CD
, tcc.CODE_VAL AS DSUSE_MTH_NM , tcc.CODE_VAL AS DSUSE_MTH_NM
, tdm.DSUSE_DE , tdm.DSUSE_DE
, tdm.DSUSE_LOC
, tdm.DSUSE_SE_CD
, IF(#{dscdmngId} = tdm.DSCDMNG_ID, 'Y', 'N') AS SELF_YN , IF(#{dscdmngId} = tdm.DSCDMNG_ID, 'Y', 'N') AS SELF_YN
, (SELECT GROUP_CONCAT(dscdmng_id SEPARATOR ',') , (SELECT GROUP_CONCAT(dscdmng_id SEPARATOR ',')
FROM tb_dsuse_mgt FROM tb_dsuse_mgt
@ -30,6 +32,7 @@
AND tdm.use_yn = 'Y' AND tdm.use_yn = 'Y'
AND tdm.dept_cd = #{deptCd} AND tdm.dept_cd = #{deptCd}
AND tdm.dsuse_mth_cd = #{dsuseMthCd} AND tdm.dsuse_mth_cd = #{dsuseMthCd}
AND tdm.dsuse_se_cd = #{dsuseSeCd}
AND tdm.dsuse_de = #{dsuseDe} AND tdm.dsuse_de = #{dsuseDe}
</select> </select>
</mapper> </mapper>

@ -141,7 +141,12 @@
AND tdm.prgrs_stts_cd = #{schSttsCd} <!-- 진행 상태 --> AND tdm.prgrs_stts_cd = #{schSttsCd} <!-- 진행 상태 -->
</if> </if>
<if test="nrcdSeNm != null"> <if test="nrcdSeNm != null">
AND tpi.nrcd_se_nm = #{nrcdSeNm} <!-- 진행 상태 --> <if test="nrcdSeNm eq '기타'">
AND tpi.nrcd_se_nm IS NULL
</if>
<if test="nrcdSeNm != '기타'">
AND tpi.nrcd_se_nm = #{nrcdSeNm}
</if><!-- 진행 상태 -->
</if> </if>
<if test="prtmSeNm != null"> <if test="prtmSeNm != null">
AND tpi.prtm_se_nm = #{prtmSeNm} <!-- 진행 상태 --> AND tpi.prtm_se_nm = #{prtmSeNm} <!-- 진행 상태 -->

@ -180,7 +180,7 @@ $(document).ready(function() {
// 저장 // 저장
$P.fnSave = async() => { $P.fnSave = async() => {
// validate 확인 // validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; if (!AppSupport.customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
let apiKeyData = $P.apiKeyFormFields.get(); let apiKeyData = $P.apiKeyFormFields.get();
@ -193,7 +193,7 @@ $(document).ready(function() {
dialog.alert({ dialog.alert({
content: "현재 API KEY 정보를 저장 하시겠습니까?" content: "현재 API KEY 정보를 저장 하시겠습니까?"
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { $P.control.save(apiKeyData); } , onOK: () => { $P.control.save(apiKeyData); }
}); });
} }

@ -269,7 +269,7 @@
} }
// DataTables(그리드) // DataTables(그리드)
let cellDefs = getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)") let cellDefs = AppSupport.getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)")
, $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); , $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
$P.control.query.cellDefs = cellDefs; $P.control.query.cellDefs = cellDefs;
@ -300,7 +300,7 @@
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고) // DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
fnMakeResizableTable($("#table-responsive--${pageName}")[0]); Componentization.fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
} }

@ -8,21 +8,17 @@
<!-- hidden --> <!-- hidden -->
<%-- <label for="bssh--${pageName}">마약류 취급업체 정보</label>--%> <%-- <label for="bssh--${pageName}">마약류 취급업체 정보</label>--%>
<div class="row my-1 mx-4 g-1" style="align-items: baseline"> <div class="row my-1 mx-4 g-1" style="align-items: baseline">
<div class="col-md-3"> <div class="col-md-6">
<label for="schBsshNm--${pageName}" class="w-px-90 bg-lighter pe-2 col-form-label text-sm-end">취급업체명</label> <label for="schBsshNm--${pageName}" class="w-px-140 bg-lighter pe-2 col-form-label text-sm-end">취급업체명/식별번호</label>
<input type="text" class="form-control w-50" id="schBsshNm--${pageName}" name="schBsshNm" data-map="schBsshNm" > <input type="text" class="form-control w-px-100" id="schBsshNm--${pageName}" name="schBsshNm" data-map="schBsshNm" >
<input type="text" class="form-control w-px-120" id="schBsshCd--${pageName}" name="schBsshCd" data-map="schBsshCd" >
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label for="schRprsntvNm--${pageName}" class="w-px-80 bg-lighter pe-2 col-form-label text-sm-end">대표자명</label> <label for="schRprsntvNm--${pageName}" class="w-px-80 bg-lighter pe-2 col-form-label text-sm-end">대표자명</label>
<input type="text" class="form-control w-50" id="schRprsntvNm--${pageName}" name="schRprsntvNm" data-map="schRprsntvNm" > <input type="text" class="form-control w-50" id="schRprsntvNm--${pageName}" name="schRprsntvNm" data-map="schRprsntvNm" >
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label for="schBsshCd--${pageName}" class="w-px-90 bg-lighter pe-2 col-form-label text-sm-end">취급자번호</label> <button type="button" class="btn btn-primary w-px-120" id="btnSearch--${pageName}" title="검색">NIMS 검색</button>
<input type="text" class="form-control w-50" id="schBsshCd--${pageName}" name="schBsshCd" data-map="schBsshCd" >
</div>
<div class="col-md-3">
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색">검색</button>&nbsp;
<button type="button" class="btn btn-primary w-px-120" id="btnSearch2--${pageName}" title="검색">NIMS 검색</button>
</div> </div>
</div> </div>
</div> </div>
@ -42,30 +38,26 @@
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}"> <div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}"> <div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info"> <table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead> <thead class="sticky-thead">
<tr> <tr>
<!-- <th style="width: 15.828px;text-align:center;" tabindex="0">No</th> --> <th class="cmn" style="width: 70px;">No.</th>
<th class="sorting" style="width: 140.156px;">취급자번호</th> <th class="sorting" style="width: 140.156px;">취급자번호</th>
<th class="sorting" style="width: 250.141px;">취급업체명</th> <th class="sorting" style="width: 250.141px;">취급업체명</th>
<th class="sorting" style="width: 160.141px;">업종명</th> <th class="sorting" style="width: 160.141px;">업종명</th>
<th class="sorting" style="width: 120.469px;">대표자</th> <th class="sorting" style="width: 120.469px;">대표자</th>
<th class="sorting" style="width: 250.469px;">허가번호</th> <th class="sorting" style="width: 250.469px;">허가번호</th>
<%-- <th class="sorting" style="width: 120.469px;">담당자명</th>--%>
<%-- <th class="sorting" style="width: 120.469px;">구분</th>--%>
</tr> </tr>
</thead> </thead>
<tbody id="tbody--${pageName}"> <tbody id="tbody--${pageName}">
</tbody> </tbody>
<template id="${infoPrefix}Row--${pageName}"> <template id="${infoPrefix}Row--${pageName}">
<tr data-key="{bsshCd}"> <tr data-key="{bsshCd}">
<!-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{bsshCd}</td> --> <td class="row-num text-end" onclick="{onclick}" ondblclick="{ondblclick}"></td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{bsshCd}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{bsshCd}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{bsshNm}</td> <td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{bsshNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{indutyNm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{indutyNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{rprsntvNm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{rprsntvNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prmisnNo}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prmisnNo}</td>
<%-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{chrgNm}</td>--%>
<%-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{hdntNm}</td>--%>
</tr> </tr>
</template> </template>
<template id="${infoPrefix}NotFound--${pageName}"> <template id="${infoPrefix}NotFound--${pageName}">
@ -131,15 +123,16 @@
**************************************************************************/ **************************************************************************/
// Dataset 변경 이벤트 // Dataset 변경 이벤트
$P.control.onDatasetChange = (obj) => { $P.control.onDatasetChange = (obj, option) => {
$P.renderList(obj.${infoPrefix}Total); $P.renderList(obj.totalCount, option);
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({ $("#${infoPrefix}Paging--${pageName}").setPagingInfo({
list: $P.control.dataset list: $P.control.dataset
, prefix: "${infoPrefix}Paging--${pageName}" , prefix: "${infoPrefix}Paging--${pageName}"
, start: obj.${infoPrefix}Start , start: obj.${infoPrefix}Start
, totalSize: $P.control.dataset.length , totalSize: obj.totalCount
, fetchSize: obj.${infoPrefix}Fetch , fetchSize: obj.${infoPrefix}Fetch
, func: "pageObject['${pageName}'].control.load({index})" // , func: "pageObject['${pageName}'].control.load({index})"
}); });
}; };
@ -162,33 +155,22 @@
**************************************************************************/ **************************************************************************/
// DataTables에 click, dbclick 이벤트 // DataTables에 click, dbclick 이벤트
$P.renderList = (totalSize) => { $P.renderList = (totalSize, option) => {
let ${infoPrefix}List = $P.control.dataset; let ${infoPrefix}List = $P.control.dataset;
let empty = ${infoPrefix}List.empty; let empty = ${infoPrefix}List.empty;
// 업무별 DataTables(그리드) tr, td let trs = empty ?
let foundContent = document.getElementById("${infoPrefix}Row--${pageName}").content; [document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML]
let foundTr = $(foundContent).find("tr")[0].cloneNode(false); : ${infoPrefix}List.inStrings(
let foundTds = $(foundContent).find("td"); document.getElementById("${infoPrefix}Row--${pageName}").innerHTML,
(str, dataItem) => str
foundTds.each(function() {
foundTr.appendChild(this.cloneNode(true));
});
//
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("bsshCd") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("bsshCd") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()"); .replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()"));
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
let noMore = (${infoPrefix}List.length >= totalSize); let noMore = (${infoPrefix}List.length >= totalSize);
let initScroll = ($P.control.query.pageNum < 2); let initScroll = ($P.control.query.pageNum < 2);
$("#tbody--${pageName}").html(trs.join()); $("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
} }
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
@ -198,13 +180,26 @@
* 버튼 clickEvent * 버튼 clickEvent
**************************************************************************/ **************************************************************************/
$P.fnSearchList = (dbSkipYn) => { $P.fnSearchList = () => {
if($P.formFields.get().schBsshCd.length + $P.formFields.get().schBsshNm.length === 0){
dialog.alert({
content: "취급업체명 또는 취급자식별번호중<br>하나는 필수입니다."
});
return false;
}
if($P.formFields.get().schBsshNm.length !== 0 && $P.formFields.get().schBsshNm.length < 2){
dialog.alert({
content: "취급업체명은 2자 이상으로 조회해 주세요."
});
return false;
}
$P.control.query = { $P.control.query = {
//... $P.formFields.get(), pg: 1,
bc: $P.formFields.get().schBsshCd, bc: $P.formFields.get().schBsshCd,
bn: $P.formFields.get().schBsshNm, bn: $P.formFields.get().schBsshNm,
rprsntvNm: $P.formFields.get().schRprsntvNm, rprsntvNm: $P.formFields.get().schRprsntvNm,
dbSkipYn: dbSkipYn? dbSkipYn : "N",
userId: "${currentUser.account}" userId: "${currentUser.account}"
}; };
$P.control.query.fetchSize = FETCH_XXL; // 한번에 조회되는 자료 건수 $P.control.query.fetchSize = FETCH_XXL; // 한번에 조회되는 자료 건수
@ -213,6 +208,12 @@
$P.control.load(1); $P.control.load(1);
} }
$P.scrollDataList = () => {
$P.control.query.pg = $P.control.query.pageNum + 1;
$P.control.load($P.control.query.pageNum + 1);
}
// 저장 // 저장
$P.fnSave = () => { $P.fnSave = () => {
let openPage = new AddsFormFields("#${openPage}"); let openPage = new AddsFormFields("#${openPage}");
@ -228,13 +229,17 @@
// 버튼 이벤트 // 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장 $("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList()); $("#btnSearch--${pageName}").on("click", () => $P.fnSearchList());
$("#btnSearch2--${pageName}").on("click", () => $P.fnSearchList("Y"));
$("#frmSearch--${pageName} input").onEnterPress($P.fnSearchList); $("#frmSearch--${pageName} input").onEnterPress($P.fnSearchList);
Componentization.fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}')
, (tr)=>{ return $(tr).find("td.row-num")[0]; }
, (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } }
);
} }
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고) // DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
fnMakeResizableTable($("#table-responsive--${pageName}")[0]); Componentization.fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => {} $P.initForm = () => {}

@ -101,15 +101,15 @@
<th class="cmn" style="width: 160.141px;">관할관청</th> <th class="cmn" style="width: 160.141px;">관할관청</th>
<th class="cmn" style="width: 120.141px;">폐기관리번호</th> <th class="cmn" style="width: 120.141px;">폐기관리번호</th>
<th class="cmn" style="width: 110.469px;">폐기일자</th> <th class="cmn" style="width: 110.469px;">폐기일자</th>
<th class="cmn" style="width: 140px;">폐기구분</th>
<th class="cmn" style="width: 150px;">폐기방법</th> <th class="cmn" style="width: 150px;">폐기방법</th>
<th class="cmn" style="width: 200.469px;">폐기장소</th>
<th class="cmn" style="width: 250.469px;">업체명</th> <th class="cmn" style="width: 250.469px;">업체명</th>
<th class="cmn" style="width: 90px;">폐기건수</th> <th class="cmn" style="width: 90px;">폐기건수</th>
<th class="cmn" style="width: 145px;">폐기결과보고서</th> <th class="cmn" style="width: 145px;">폐기결과보고서</th>
<th class="cmn" style="width: 145px;">처리내역및사진</th> <th class="cmn" style="width: 145px;">처리내역및사진</th>
<th class="cmn" style="width: 160.469px;">처리상태</th> <th class="cmn" style="width: 160.469px;">처리상태</th>
<th class="cmn" style="width: 180.469px;">폐기사유</th> <th class="cmn" style="width: 180.469px;">폐기사유</th>
<th class="cmn" style="width: 140px;">폐기구분</th>
<th class="cmn" style="width: 200.469px;">폐기장소</th>
<th class="cmn" style="width: 110.141px;">취급일자</th> <th class="cmn" style="width: 110.141px;">취급일자</th>
</tr> </tr>
</thead> </thead>
@ -125,7 +125,9 @@
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dept_nm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dept_nm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dscdmng_id}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dscdmng_id}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_de}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_de}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_se_nm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_mth_nm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_mth_nm}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_loc}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{bssh_nm}</td> <td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{bssh_nm}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{rnd_dtl_rpt_cnt}</td> <td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{rnd_dtl_rpt_cnt}</td>
<td class="cmn text-center" onclick="{onclick}"> <td class="cmn text-center" onclick="{onclick}">
@ -136,8 +138,6 @@
</td> </td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prgrs_stts_nm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prgrs_stts_nm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_prv_nm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_prv_nm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_se_nm}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_loc}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{hdr_de}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{hdr_de}</td>
</tr> </tr>
</template> </template>
@ -336,7 +336,7 @@
dialog.alert({ dialog.alert({
content: "선택한 폐기관리 정보로 "+ docName+" 파일을 생성 하시겠습니까?" content: "선택한 폐기관리 정보로 "+ docName+" 파일을 생성 하시겠습니까?"
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { , onOK: () => {
$P.fnCreateDoc(ADDS12); $P.fnCreateDoc(ADDS12);
} }
@ -368,7 +368,7 @@
content: "파일 생성 중 오류가 발생하였습니다." content: "파일 생성 중 오류가 발생하였습니다."
+"<br/>" +"<br/>"
+responseJson.description, +responseJson.description,
init: () => { setDialogZindex(); } init: () => { AppSupport.setDialogZindex(); }
}); });
}); });
return false; return false;
@ -448,7 +448,7 @@
} }
// DataTables(그리드) // DataTables(그리드)
let cellDefs = getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)") let cellDefs = AppSupport.getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)")
, $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); , $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
$P.control.query.cellDefs = cellDefs; $P.control.query.cellDefs = cellDefs;
@ -500,7 +500,7 @@
}); });
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고) // DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
fnMakeResizableTable($("#table-responsive--${pageName}")[0]); Componentization.fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
} }
@ -517,8 +517,8 @@
searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); }); searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); });
// 기본 데이터 설정 // 기본 데이터 설정
initDatepicker("frmSearch--${pageName}"); // 달력 초기화 AppSupport.initDatepicker("frmSearch--${pageName}"); // 달력 초기화
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작 $("#schDateFrom--${pageName}").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료 $("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료
$('#schSttsCd--${pageName}').val('06'); $('#schSttsCd--${pageName}').val('06');

@ -328,7 +328,7 @@
// 끝에서 2개의 th 요소 선택 // 끝에서 2개의 th 요소 선택
let lastColNames = $(`#theadTr0--${pageName} th`).not("[colspan]").slice(-2); let lastColNames = $(`#theadTr0--${pageName} th`).not("[colspan]").slice(-2);
$P.control.query.cellDefs = getCellDefs( $P.control.query.cellDefs = AppSupport.getCellDefs(
$([...firstColNames, ...middleColNames, ...lastColNames]), $([...firstColNames, ...middleColNames, ...lastColNames]),
$($("#${infoPrefix}Row--${pageName}")[0].content).find("td") $($("#${infoPrefix}Row--${pageName}")[0].content).find("td")
.not(".dummy-td").not(":eq(0)").not("[colspan]") .not(".dummy-td").not(":eq(0)").not("[colspan]")
@ -386,8 +386,8 @@
searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); }); searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); });
// 기본 데이터 설정 // 기본 데이터 설정
initDatepicker("frmSearch--${pageName}"); // 달력 초기화 AppSupport.initDatepicker("frmSearch--${pageName}"); // 달력 초기화
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작 $("#schDateFrom--${pageName}").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료 $("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료
$('#schSggCd--${pageName}').val("${currentUser.deptCode}"); $('#schSggCd--${pageName}').val("${currentUser.deptCode}");

@ -348,7 +348,7 @@
// 끝에서 2개의 th 요소 선택 // 끝에서 2개의 th 요소 선택
let lastColNames = $(`#theadTr0--${pageName} th`).not("[colspan]").slice(-2); let lastColNames = $(`#theadTr0--${pageName} th`).not("[colspan]").slice(-2);
$P.control.query.cellDefs = getCellDefs( $P.control.query.cellDefs = AppSupport.getCellDefs(
$([...firstColNames, ...middleColNames, ...lastColNames]), $([...firstColNames, ...middleColNames, ...lastColNames]),
$($("#${infoPrefix}Row--${pageName}")[0].content).find("td") $($("#${infoPrefix}Row--${pageName}")[0].content).find("td")
.not(".dummy-td").not(":eq(0)").not("[colspan]") .not(".dummy-td").not(":eq(0)").not("[colspan]")
@ -406,8 +406,8 @@
searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); }); searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); });
// 기본 데이터 설정 // 기본 데이터 설정
initDatepicker("frmSearch--${pageName}"); // 달력 초기화 AppSupport.initDatepicker("frmSearch--${pageName}"); // 달력 초기화
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작 $("#schDateFrom--${pageName}").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료 $("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료
$('#schSggCd--${pageName}').val("${currentUser.deptCode}"); $('#schSggCd--${pageName}').val("${currentUser.deptCode}");

@ -326,7 +326,7 @@
// 끝에서 2개의 th 요소 선택 // 끝에서 2개의 th 요소 선택
let lastColNames = $(`#theadTr0--${pageName} th`).not("[colspan]").slice(-2); let lastColNames = $(`#theadTr0--${pageName} th`).not("[colspan]").slice(-2);
$P.control.query.cellDefs = getCellDefs( $P.control.query.cellDefs = AppSupport.getCellDefs(
$([...firstColNames, ...middleColNames, ...lastColNames]), $([...firstColNames, ...middleColNames, ...lastColNames]),
$($("#${infoPrefix}Row--${pageName}")[0].content).find("td") $($("#${infoPrefix}Row--${pageName}")[0].content).find("td")
.not(".dummy-td").not(":eq(0)").not("[colspan]") .not(".dummy-td").not(":eq(0)").not("[colspan]")
@ -386,8 +386,8 @@
searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); }); searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); });
// 기본 데이터 설정 // 기본 데이터 설정
initDatepicker("frmSearch--${pageName}"); // 달력 초기화 AppSupport.initDatepicker("frmSearch--${pageName}"); // 달력 초기화
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작 $("#schDateFrom--${pageName}").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료 $("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료
$('#schSggCd--${pageName}').val("${currentUser.deptCode}"); $('#schSggCd--${pageName}').val("${currentUser.deptCode}");

@ -402,7 +402,7 @@
ajax.post({ ajax.post({
url: wctx.url("/adds/nims/modifyMappingDsuseMgt.do") url: wctx.url("/adds/nims/modifyMappingDsuseMgt.do")
, data: JSON.stringify({ , data: {
dscdmngId: $P.formFields.get().dscdmngId, dscdmngId: $P.formFields.get().dscdmngId,
prgrsSttsCd: "21", prgrsSttsCd: "21",
usrRptIdNo: $P.mappingControl.dataset.getCurrent().usrRptIdNo, usrRptIdNo: $P.mappingControl.dataset.getCurrent().usrRptIdNo,
@ -410,8 +410,7 @@
rptTyCd: $P.mappingControl.dataset.getCurrent().rptTyCd, rptTyCd: $P.mappingControl.dataset.getCurrent().rptTyCd,
stts: $P.mappingControl.dataset.getCurrent().status, stts: $P.mappingControl.dataset.getCurrent().status,
userId: "${currentUser.account}" userId: "${currentUser.account}"
}) }
, contentType : "application/json; charset=utf-8"
, success: resp => { , success: resp => {
if(!resp.success){ if(!resp.success){
dialog.alert({ dialog.alert({
@ -510,7 +509,7 @@
if(!checkData){ if(!checkData){
dialog.alert({ dialog.alert({
content: "선택한 NIMS 폐기보고 데이타가 없습니다." content: "선택한 NIMS 폐기보고 데이타가 없습니다."
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => {} , onOK: () => {}
}); });
return false; return false;
@ -519,7 +518,7 @@
dialog.alert({ dialog.alert({
content: "확인 선택한 NIMS 폐기보고 정보를 저장 하시겠습니까?" content: "확인 선택한 NIMS 폐기보고 정보를 저장 하시겠습니까?"
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { , onOK: () => {
$P.control.save(); // formFields $P.control.save(); // formFields
} }

@ -90,13 +90,13 @@
<th class="cmn" style="width: 170.141px;">관할관청</th> <th class="cmn" style="width: 170.141px;">관할관청</th>
<th class="cmn" style="width: 120.141px;">폐기관리번호</th> <th class="cmn" style="width: 120.141px;">폐기관리번호</th>
<th class="cmn" style="width: 110.469px;">폐기일자</th> <th class="cmn" style="width: 110.469px;">폐기일자</th>
<th class="cmn" style="width: 150px;">폐기구분</th>
<th class="cmn" style="width: 150px;">폐기방법</th> <th class="cmn" style="width: 150px;">폐기방법</th>
<th class="cmn" style="width: 300.469px;">업체명</th> <th class="cmn" style="width: 300.469px;">업체명</th>
<th class="cmn" style="width: 90px;">보고건수</th> <th class="cmn" style="width: 90px;">보고건수</th>
<th class="cmn" style="width: 270.469px;">NIMS보고ID</th> <th class="cmn" style="width: 270.469px;">NIMS보고ID</th>
<th class="cmn" style="width: 160.469px;">처리상태</th> <th class="cmn" style="width: 160.469px;">처리상태</th>
<th class="cmn" style="width: 180.469px;">폐기사유</th> <th class="cmn" style="width: 180.469px;">폐기사유</th>
<th class="cmn" style="width: 150px;">폐기구분</th>
<th class="cmn" style="width: 200.469px;">폐기장소</th> <th class="cmn" style="width: 200.469px;">폐기장소</th>
<th class="cmn" style="width: 110.141px;">취급일자</th> <th class="cmn" style="width: 110.141px;">취급일자</th>
</tr> </tr>
@ -109,6 +109,7 @@
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DEPT_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DEPT_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSCDMNG_ID}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSCDMNG_ID}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_DE}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_DE}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_SE_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_MTH_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_MTH_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{BSSH_NM}</td> <td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{BSSH_NM}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{RND_DTL_RPT_CNT}</td> <td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{RND_DTL_RPT_CNT}</td>
@ -117,7 +118,6 @@
</td> </td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRGRS_STTS_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRGRS_STTS_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_PRV_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_PRV_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_SE_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_LOC}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_LOC}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{HDR_DE}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{HDR_DE}</td>
</tr> </tr>
@ -374,8 +374,8 @@
dialog.alert({ dialog.alert({
content : showMessage, content : showMessage,
init : function(){ init : function(){
setDialogZindex(); AppSupport.setDialogZindex();
focusClose(); AppSupport.focusClose();
} }
}); });
@ -500,7 +500,7 @@
dialog.alert({ dialog.alert({
content : "현재 " + $P.control.dataset.getCurrent().DSCDMNG_ID + " 정보를 완료 처리 하시겠습니까?", content : "현재 " + $P.control.dataset.getCurrent().DSCDMNG_ID + " 정보를 완료 처리 하시겠습니까?",
init : function() { init : function() {
focusOK(); AppSupport.focusOK();
}, },
onOK : () => { onOK : () => {
$P.control.prgsSttus(); $P.control.prgsSttus();
@ -553,7 +553,7 @@
} }
// DataTables(그리드) // DataTables(그리드)
let cellDefs = getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)") let cellDefs = AppSupport.getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)")
, $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); , $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
$P.control.query.cellDefs = cellDefs; $P.control.query.cellDefs = cellDefs;
@ -602,13 +602,13 @@
}); });
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고) // DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
fnMakeResizableTable($("#table-responsive--${pageName}")[0]); Componentization.fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
// DataTables 스크롤 이벤트 생성 // DataTables 스크롤 이벤트 생성
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList); Componentization.fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
// 하단 테이블 행 번호 표시 // 하단 테이블 행 번호 표시
fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}Detail') Componentization.fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}Detail')
, (tr)=>{ return $(tr).find("td.row-num")[0]; } , (tr)=>{ return $(tr).find("td.row-num")[0]; }
, (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } } , (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } }
); );
@ -627,8 +627,8 @@
searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); }); searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); });
// 기본 데이터 설정 // 기본 데이터 설정
initDatepicker("frmSearch--${pageName}"); // 달력 초기화 AppSupport.initDatepicker("frmSearch--${pageName}"); // 달력 초기화
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작 $("#schDateFrom--${pageName}").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료 $("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료
$('#schSttsCd--${pageName}').val('06'); $('#schSttsCd--${pageName}').val('06');

@ -351,7 +351,7 @@
let lastColNames = $(`#theadTr0--${pageName} th`).not("[colspan]").slice(-2); let lastColNames = $(`#theadTr0--${pageName} th`).not("[colspan]").slice(-2);
// DataTables(그리드) // DataTables(그리드)
$P.control.query.cellDefs = getCellDefs( $P.control.query.cellDefs = AppSupport.getCellDefs(
$([...firstColNames, ...middleColNames, ...lastColNames]), $([...firstColNames, ...middleColNames, ...lastColNames]),
$($("#${infoPrefix}Row--${pageName}")[0].content).find("td") $($("#${infoPrefix}Row--${pageName}")[0].content).find("td")
.not(".dummy-td").not(":eq(0)").not("[colspan]") .not(".dummy-td").not(":eq(0)").not("[colspan]")
@ -410,8 +410,8 @@
searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); }); searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); });
// 기본 데이터 설정 // 기본 데이터 설정
initDatepicker("frmSearch--${pageName}"); // 달력 초기화 AppSupport.initDatepicker("frmSearch--${pageName}"); // 달력 초기화
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작 $("#schDateFrom--${pageName}").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료 $("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료
$('#schSggCd--${pageName}').val("${currentUser.deptCode}"); $('#schSggCd--${pageName}').val("${currentUser.deptCode}");

@ -27,6 +27,15 @@
<!-- hidden --> <!-- hidden -->
<input type="hidden" name="dscdmngId" data-map="dscdmngId" /> <input type="hidden" name="dscdmngId" data-map="dscdmngId" />
<input type="hidden" name="prgrsSttsCd" data-map="prgrsSttsCd" /> <input type="hidden" name="prgrsSttsCd" data-map="prgrsSttsCd" />
<input type="hidden" name="indutyNm" data-map="indutyNm"/>
<input type="hidden" name="hdntCd" data-map="hdntCd"/>
<input type="hidden" name="hdntNm" data-map="hdntNm"/>
<input type="hidden" name="chrgNm" data-map="chrgNm"/>
<input type="hidden" name="hptlNo" data-map="hptlNo"/>
<input type="hidden" name="joinYn" data-map="joinYn"/>
<input type="hidden" name="bsshSttusNm" data-map="bsshSttusNm"/>
<label for="bssh--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>취급 업체 정보</strong></label> <label for="bssh--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>취급 업체 정보</strong></label>
<div class="row my-1 mx-4 g-1 border-card rounded-3"> <div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-4"> <div class="col-md-4">
@ -34,7 +43,7 @@
<input type="text" class="form-control w-70" id="bsshNm--${pageName}" name="bsshNm" data-map="bsshNm" readonly> <input type="text" class="form-control w-70" id="bsshNm--${pageName}" name="bsshNm" data-map="bsshNm" readonly>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<label for="bsshCd--${pageName}" class="w-px-100 bg-lighter pe-2 col-form-label text-sm-end">식별번호</label> <label for="bsshCd--${pageName}" class="w-px-100 bg-lighter pe-2 col-form-label text-sm-end">업체식별번호</label>
<input type="text" class="form-control w-px-150" id="bsshNm--${pageName}" name="bsshCd" data-map="bsshCd" readonly> <input type="text" class="form-control w-px-150" id="bsshNm--${pageName}" name="bsshCd" data-map="bsshCd" readonly>
<button type="button" class="btn btn-search w-px-100" id="btnBsshSearch--${pageName}" title="업체 검색">업체 검색</button> <button type="button" class="btn btn-search w-px-100" id="btnBsshSearch--${pageName}" title="업체 검색">업체 검색</button>
</div> </div>
@ -67,6 +76,13 @@
<div class="row my-1 mx-1 g-1 border-card rounded"></div> <div class="row my-1 mx-1 g-1 border-card rounded"></div>
</form> </form>
<form id="product--${pageName}" name="product"> <form id="product--${pageName}" name="product">
<input type="hidden" name="prdlstMstCd" data-map="prdlstMstCd"/>
<input type="hidden" name="nrcdSeNm" data-map="nrcdSeNm"/>
<input type="hidden" name="prtmSeNm" data-map="prtmSeNm"/>
<input type="hidden" name="bsshCd" data-map="bsshCd"/>
<input type="hidden" name="rgsDt" data-map="rgsDt"/>
<input type="hidden" name="updDt" data-map="updDt"/>
<label for="product--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>폐기 제품 정보</strong></label> <label for="product--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>폐기 제품 정보</strong></label>
<div class="row my-1 mx-4 g-1 border-card rounded-3"> <div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-6"> <div class="col-md-6">
@ -187,12 +203,17 @@
const fnPrdChange = (e) => { const fnPrdChange = (e) => {
let key = e.target.closest('tr').dataset.key; const key = e.target.closest('tr').dataset.key;
const name = e.target.name;
let value = e.target.value; let value = e.target.value;
let name = e.target.name;
//alert(JSON.stringify($P.productList.getData(key))); if(name === 'dsuseQy') {
let parts = value.replace(/[^0-9.]/g, '').split('.').filter(d=> d !== '');
if(parts.length > 1) value = parts.shift() + '.' + parts.join('');
else value = parts[0]
e.target.value = value;
}
$P.productList.setValue(key, name, value); $P.productList.setValue(key, name, value);
//alert(JSON.stringify($P.productList.getData(key)));
} }
const fnBarcodeSearch = (barcode) => { const fnBarcodeSearch = (barcode) => {
@ -225,6 +246,12 @@
mnfNo: prdInfo.mnfSeqInfos[0].mnfNo, mnfNo: prdInfo.mnfSeqInfos[0].mnfNo,
mnfSeq: prdInfo.mnfSeqInfos[0].mnfSeq, mnfSeq: prdInfo.mnfSeqInfos[0].mnfSeq,
prdlstMstCd: prdInfo.prdlstMstCd,
nrcdSeNm: prdInfo.nrcdSeNm,
prtmSeNm: prdInfo.prtmSeNm,
bsshCd: prdInfo.bsshCd,
rgsDt: prdInfo.rgsDt,
updDt: prdInfo.updDt
} }
); );
$("#prductCd--${pageName}").prop("readonly", true); $("#prductCd--${pageName}").prop("readonly", true);
@ -324,7 +351,7 @@
// 메시지 출력 // 메시지 출력
dialog.alert({ dialog.alert({
content: showMessage content: showMessage
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { } , onOK: () => { }
}); });
@ -346,7 +373,7 @@
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.control.infoSize , size : $P.control.infoSize
, onClose : () => { $P.control.setData(); } , onClose : () => { $P.control.setData([]); }
}); });
} }
}); });
@ -354,18 +381,29 @@
$P.productControl.getProductInfo = () => { $P.productControl.getProductInfo = () => {
let dialogTitle = "마약류 제품 조회"; let dialogTitle = "마약류 제품 조회";
let params = {openPage : "product--${pageName}"}; let rowData = $P.bsshFormFields.get();
if(rowData.bsshCd == null || rowData.bsshCd === "") {
dialog.alert({
content: "업체를 먼저 선택해주세요."
});
return false;
}
let params = {
openPage : "product--${pageName}"
, bsshCd: rowData.bsshCd
};
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/product-popup.do") url : wctx.url("/adds/nims/product-popup.do")
, data : params , data : params
, success : resp => { , success : resp => {
dialog.open({ dialog.open({
id : "productMainDialog" id : "productPopupDialog"
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.productControl.infoSize , size : $P.productControl.infoSize
, onClose : () => { $P.productControl.setData(); } , onClose : () => { $P.productControl.setData([]); }
}); });
} }
}); });
@ -401,7 +439,14 @@
} }
$P.productList.onAppend = item => { $P.productList.onAppend = (item) => {
if($P.productList._items != null && $P.productList._items.length > 0){
$P.productList._items.forEach((it)=>{
if(it.state == "added"){
it.state = "";
}
});
}
if (!item) return; if (!item) return;
if (item.length < 1) return; if (item.length < 1) return;
@ -427,7 +472,7 @@
$("#tbody--productList").append(tr); $("#tbody--productList").append(tr);
fnMakeGridImageViewer( AddsComponentization.fnMakeGridImageViewer(
$("#tbody--productList").find("td.prdDsuseImg").last()[0], $("#tbody--productList").find("td.prdDsuseImg").last()[0],
"dsusePrdImgFiles", "dsusePrdImgFiles",
di.data.fileInfo di.data.fileInfo
@ -472,12 +517,12 @@
// 저장 // 저장
$P.fnSave = async() => { $P.fnSave = async() => {
// validate 확인 // validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; if (!AppSupport.customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
let bsshData = $P.bsshFormFields.get(); let bsshData = $P.bsshFormFields.get();
if(bsshData.bsshCd == ""){ if(bsshData.bsshCd === ""){
dialog.alert({ dialog.alert({
content: "마약류 취급업체 정보를 입력해주세요." content: "마약류 취급업체 정보를 입력해주세요."
}); });
@ -489,7 +534,7 @@
} }
let dsProd = $P.productList.getDataset(); let dsProd = $P.productList.getDataset();
if(dsProd.length == 0){ if(dsProd.length === 0){
dialog.alert({ dialog.alert({
content: "폐기 제품 정보를 입력해주세요." content: "폐기 제품 정보를 입력해주세요."
}); });
@ -538,7 +583,7 @@
} }
}); });
if(dsProd.length != fileCount){ if(dsProd.length !== fileCount){
dialog.alert({ dialog.alert({
content: "입력되지 않은 폐기 제품 이미지가 있습니다." content: "입력되지 않은 폐기 제품 이미지가 있습니다."
}); });
@ -547,7 +592,7 @@
dialog.alert({ dialog.alert({
content: "현재 폐기 신청서 접수 정보를 저장 하시겠습니까?" content: "현재 폐기 신청서 접수 정보를 저장 하시겠습니까?"
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { , onOK: () => {
let promiseArr = []; let promiseArr = [];
@ -561,7 +606,7 @@
fileInfo.MIME_TYPE = this.dataset.mimeType; fileInfo.MIME_TYPE = this.dataset.mimeType;
fileInfo.FILE_NM = this.dataset.fileNm; fileInfo.FILE_NM = this.dataset.fileNm;
fileInfo.FILE_ID = this.dataset.fileId; fileInfo.FILE_ID = this.dataset.fileId;
promiseArr.push(fnCreateFileFromFileInfo(fileInfo)); promiseArr.push(AddsSupport.fnCreateFileFromFileInfo(fileInfo));
} }
}); });
@ -600,7 +645,7 @@
const prdInfo = ""+prdFrm.prductCd+prdFrm.prdValidDe.replaceAll('-','')+prdFrm.mnfNo+prdFrm.mnfSeq; const prdInfo = ""+prdFrm.prductCd+prdFrm.prdValidDe.replaceAll('-','')+prdFrm.mnfNo+prdFrm.mnfSeq;
let isDup = $P.productList let isDup = $P.productList
.getDataset() .getDataset()
.filter(item => prdInfo == ""+item.prductCd+item.prdValidDe.replaceAll('-','')+item.mnfNo+item.mnfSeq) .filter(item => prdInfo === ""+item.prductCd+item.prdValidDe.replaceAll('-','')+item.mnfNo+item.mnfSeq)
.length > 0; .length > 0;
if(isDup){ if(isDup){
const msg = "이미 추가된 제품 입니다<br>제품코드: " + prdFrm.prductCd +"<br>유효기간: "+ prdFrm.prdValidDe +"<br>제조번호: "+ prdFrm.mnfNo +"<br>제조일련번호: "+ prdFrm.mnfSeq; const msg = "이미 추가된 제품 입니다<br>제품코드: " + prdFrm.prductCd +"<br>유효기간: "+ prdFrm.prdValidDe +"<br>제조번호: "+ prdFrm.mnfNo +"<br>제조일련번호: "+ prdFrm.mnfSeq;
@ -617,12 +662,12 @@
$P.fnDel = () => { $P.fnDel = () => {
// validate 확인 // validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; if (!AppSupport.customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
const row = $P.productList.getCurrent(); const row = $P.productList.getCurrent();
dialog.alert({ dialog.alert({
content: "아래 제품을 삭제하시겠습니까?<br>제품명: "+row.prductNm + "<br>유효기간: " +row.prdValidDe+"<br>제조번호: "+row.mnfNo+"<br>일련번호: " + row.mnfSeq content: "아래 제품을 삭제하시겠습니까?<br>제품명: "+row.prductNm + "<br>유효기간: " +row.prdValidDe+"<br>제조번호: "+row.mnfNo+"<br>일련번호: " + row.mnfSeq
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { , onOK: () => {
$P.productList.remove($P.productList.getCurrent().keyCnt); $P.productList.remove($P.productList.getCurrent().keyCnt);
} }
@ -632,7 +677,7 @@
$P.fnChangeDsusePrvCd = () => { $P.fnChangeDsusePrvCd = () => {
// validate 확인 // validate 확인
let checkData = $("#dsusePrvCd--${pageName} option:selected").val(); let checkData = $("#dsusePrvCd--${pageName} option:selected").val();
if (checkData =="01" || checkData =="02") { if (checkData ==="01" || checkData ==="02") {
$("#dsuseAcdtDe--${pageName}").prop('disabled', false); $("#dsuseAcdtDe--${pageName}").prop('disabled', false);
}else{ }else{
$("#dsuseAcdtDe--${pageName}").prop('disabled', true); $("#dsuseAcdtDe--${pageName}").prop('disabled', true);
@ -680,16 +725,19 @@
} }
}); });
// 숫자만 입력받도록 input 요소에 이벤트 리스너 추가
$("input[name='dsuseQy']").on('change', function() {
this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');
});
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
} }
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.initForm = () => {
if($("input[name='prgrsSttsCd']").val() == '99' || ${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) { if($("input[name='prgrsSttsCd']").val() === '99' || ${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) {
$("#btnSave--${pageName}").prop("disabled", true); $("#btnSave--${pageName}").prop("disabled", true);
} }
initDatepicker("bssh--${pageName}"); AppSupport.initDatepicker("bssh--${pageName}");
$("#dsuseAcdtDe--${pageName}").datepicker("setDate", new Date()); $("#dsuseAcdtDe--${pageName}").datepicker("setDate", new Date());
} }
@ -712,7 +760,7 @@
for(let p of productInfo){ for(let p of productInfo){
p.keyCnt = (""+prdRowKey++); p.keyCnt = (""+prdRowKey++);
for(let f of fileInfo){ for(let f of fileInfo){
if(p.dscdmngSn == f.SUB_TYPE){ if(p.dscdmngSn === f.SUB_TYPE){
p.fileInfo = f; p.fileInfo = f;
} }
} }

@ -14,6 +14,15 @@
<!-- hidden --> <!-- hidden -->
<input type="hidden" name="dscdmngId" data-map="dscdmngId" /> <input type="hidden" name="dscdmngId" data-map="dscdmngId" />
<input type="hidden" name="prgrsSttsCd" data-map="prgrsSttsCd" /> <input type="hidden" name="prgrsSttsCd" data-map="prgrsSttsCd" />
<input type="hidden" name="indutyNm" data-map="indutyNm"/>
<input type="hidden" name="hdntCd" data-map="hdntCd"/>
<input type="hidden" name="hdntNm" data-map="hdntNm"/>
<input type="hidden" name="chrgNm" data-map="chrgNm"/>
<input type="hidden" name="hptlNo" data-map="hptlNo"/>
<input type="hidden" name="joinYn" data-map="joinYn"/>
<input type="hidden" name="bsshSttusNm" data-map="bsshSttusNm"/>
<label for="bssh--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>취급 업체 정보</strong></label> <label for="bssh--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>취급 업체 정보</strong></label>
<div class="row my-1 mx-4 g-1 border-card rounded-3"> <div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-4"> <div class="col-md-4">
@ -21,7 +30,7 @@
<input type="text" class="form-control w-70" id="bsshNm--${pageName}" name="bsshNm" data-map="bsshNm" readonly> <input type="text" class="form-control w-70" id="bsshNm--${pageName}" name="bsshNm" data-map="bsshNm" readonly>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<label for="bsshCd--${pageName}" class="w-px-100 bg-lighter pe-2 col-form-label text-sm-end">식별번호</label> <label for="bsshCd--${pageName}" class="w-px-100 bg-lighter pe-2 col-form-label text-sm-end">업체식별번호</label>
<input type="text" class="form-control w-px-150" id="bsshNm--${pageName}" name="bsshCd" data-map="bsshCd" readonly> <input type="text" class="form-control w-px-150" id="bsshNm--${pageName}" name="bsshCd" data-map="bsshCd" readonly>
<button type="button" class="btn btn-search w-px-100" id="btnBsshSearch--${pageName}" title="업체 검색">업체 검색</button> <button type="button" class="btn btn-search w-px-100" id="btnBsshSearch--${pageName}" title="업체 검색">업체 검색</button>
</div> </div>
@ -54,6 +63,13 @@
<div class="row my-1 mx-1 g-1 border-card rounded"></div> <div class="row my-1 mx-1 g-1 border-card rounded"></div>
</form> </form>
<form id="product--${pageName}" name="product"> <form id="product--${pageName}" name="product">
<input type="hidden" name="prdlstMstCd" data-map="prdlstMstCd"/>
<input type="hidden" name="nrcdSeNm" data-map="nrcdSeNm"/>
<input type="hidden" name="prtmSeNm" data-map="prtmSeNm"/>
<input type="hidden" name="bsshCd" data-map="bsshCd"/>
<input type="hidden" name="rgsDt" data-map="rgsDt"/>
<input type="hidden" name="updDt" data-map="updDt"/>
<label for="product--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>폐기 제품 정보</strong></label> <label for="product--${pageName}" style="margin-top: 10px; padding-left: 20px;"><strong>폐기 제품 정보</strong></label>
<div class="row my-1 mx-4 g-1 border-card rounded-3"> <div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-6"> <div class="col-md-6">
@ -169,6 +185,7 @@
* script 진입 * script 진입
**************************************************************************/ **************************************************************************/
$(document).ready(function() { $(document).ready(function() {
const fnBarcodeSearch = (barcode) => { const fnBarcodeSearch = (barcode) => {
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/getNimsPrdMnfSeqInfoOfBarcode.do") url : wctx.url("/adds/nims/getNimsPrdMnfSeqInfoOfBarcode.do")
@ -199,6 +216,12 @@
mnfNo: prdInfo.mnfSeqInfos[0].mnfNo, mnfNo: prdInfo.mnfSeqInfos[0].mnfNo,
mnfSeq: prdInfo.mnfSeqInfos[0].mnfSeq, mnfSeq: prdInfo.mnfSeqInfos[0].mnfSeq,
prdlstMstCd: prdInfo.prdlstMstCd,
nrcdSeNm: prdInfo.nrcdSeNm,
prtmSeNm: prdInfo.prtmSeNm,
bsshCd: prdInfo.bsshCd,
rgsDt: prdInfo.rgsDt,
updDt: prdInfo.updDt
} }
); );
$("#prductCd--${pageName}").prop("readonly", true); $("#prductCd--${pageName}").prop("readonly", true);
@ -301,7 +324,7 @@
// 메시지 출력 // 메시지 출력
dialog.alert({ dialog.alert({
content: showMessage content: showMessage
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { } , onOK: () => { }
}); });
@ -323,7 +346,7 @@
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.control.infoSize , size : $P.control.infoSize
, onClose : () => { $P.control.setData(); } , onClose : () => { $P.control.setData([]); }
}); });
} }
}); });
@ -331,18 +354,29 @@
$P.productControl.getProductInfo = () => { $P.productControl.getProductInfo = () => {
let dialogTitle = "마약류 제품 조회"; let dialogTitle = "마약류 제품 조회";
let params = {openPage : "product--${pageName}"}; let rowData = $P.bsshFormFields.get();
if(rowData.bsshCd == null || rowData.bsshCd === "") {
dialog.alert({
content: "업체를 먼저 선택해주세요."
});
return false;
}
let params = {
openPage : "product--${pageName}"
, bsshCd : rowData.bsshCd
};
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/product-popup.do") url : wctx.url("/adds/nims/product-popup.do")
, data : params , data : params
, success : resp => { , success : resp => {
dialog.open({ dialog.open({
id : "productMainDialog" id : "productPopupDialog"
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.productControl.infoSize , size : $P.productControl.infoSize
, onClose : () => { $P.productControl.setData(); } , onClose : () => { $P.productControl.setData([]); }
}); });
} }
}); });
@ -378,7 +412,14 @@
} }
$P.productList.onAppend = item => { $P.productList.onAppend = (item) => {
if($P.productList._items != null && $P.productList._items.length > 0){
$P.productList._items.forEach((it)=>{
if(it.state == "added"){
it.state = "";
}
});
}
if (!item) return; if (!item) return;
if (item.length < 1) return; if (item.length < 1) return;
@ -404,7 +445,7 @@
$("#tbody--productList").append(tr); $("#tbody--productList").append(tr);
fnMakeGridImageViewer( AddsComponentization.fnMakeGridImageViewer(
$("#tbody--productList").find("td.prdDsuseImg").last()[0], $("#tbody--productList").find("td.prdDsuseImg").last()[0],
"dsusePrdImgFiles", "dsusePrdImgFiles",
di.data.fileInfo di.data.fileInfo
@ -449,12 +490,12 @@
// 저장 // 저장
$P.fnSave = async() => { $P.fnSave = async() => {
// validate 확인 // validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; if (!AppSupport.customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
let bsshData = $P.bsshFormFields.get(); let bsshData = $P.bsshFormFields.get();
if(bsshData.bsshCd == ""){ if(bsshData.bsshCd === ""){
dialog.alert({ dialog.alert({
content: "마약류 취급업체 정보를 입력해주세요." content: "마약류 취급업체 정보를 입력해주세요."
}); });
@ -466,7 +507,7 @@
} }
let dsProd = $P.productList.getDataset(); let dsProd = $P.productList.getDataset();
if(dsProd.length == 0){ if(dsProd.length === 0){
dialog.alert({ dialog.alert({
content: "폐기 제품 정보를 입력해주세요." content: "폐기 제품 정보를 입력해주세요."
}); });
@ -482,7 +523,7 @@
} }
}); });
if(dsProd.length != fileCount){ if(dsProd.length !== fileCount){
dialog.alert({ dialog.alert({
content: "입력되지 않은 폐기 제품 이미지가 있습니다." content: "입력되지 않은 폐기 제품 이미지가 있습니다."
}); });
@ -491,7 +532,7 @@
dialog.alert({ dialog.alert({
content: "현재 폐기 신청서 접수 정보를 저장 하시겠습니까?" content: "현재 폐기 신청서 접수 정보를 저장 하시겠습니까?"
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { , onOK: () => {
let promiseArr = []; let promiseArr = [];
@ -505,7 +546,7 @@
fileInfo.MIME_TYPE = this.dataset.mimeType; fileInfo.MIME_TYPE = this.dataset.mimeType;
fileInfo.FILE_NM = this.dataset.fileNm; fileInfo.FILE_NM = this.dataset.fileNm;
fileInfo.FILE_ID = this.dataset.fileId; fileInfo.FILE_ID = this.dataset.fileId;
promiseArr.push(fnCreateFileFromFileInfo(fileInfo)); promiseArr.push(AddsSupport.fnCreateFileFromFileInfo(fileInfo));
} }
}); });
@ -544,7 +585,7 @@
const prdInfo = ""+prdFrm.prductCd+prdFrm.prdValidDe.replaceAll('-','')+prdFrm.mnfNo+prdFrm.mnfSeq; const prdInfo = ""+prdFrm.prductCd+prdFrm.prdValidDe.replaceAll('-','')+prdFrm.mnfNo+prdFrm.mnfSeq;
let isDup = $P.productList let isDup = $P.productList
.getDataset() .getDataset()
.filter(item => prdInfo == ""+item.prductCd+item.prdValidDe.replaceAll('-','')+item.mnfNo+item.mnfSeq) .filter(item => prdInfo === ""+item.prductCd+item.prdValidDe.replaceAll('-','')+item.mnfNo+item.mnfSeq)
.length > 0; .length > 0;
if(isDup){ if(isDup){
const msg = "이미 추가된 제품 입니다<br>제품코드: " + prdFrm.prductCd +"<br>유효기간: "+ prdFrm.prdValidDe +"<br>제조번호: "+ prdFrm.mnfNo +"<br>제조일련번호: "+ prdFrm.mnfSeq; const msg = "이미 추가된 제품 입니다<br>제품코드: " + prdFrm.prductCd +"<br>유효기간: "+ prdFrm.prdValidDe +"<br>제조번호: "+ prdFrm.mnfNo +"<br>제조일련번호: "+ prdFrm.mnfSeq;
@ -561,12 +602,12 @@
$P.fnDel = () => { $P.fnDel = () => {
// validate 확인 // validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; if (!AppSupport.customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
const row = $P.productList.getCurrent(); const row = $P.productList.getCurrent();
dialog.alert({ dialog.alert({
content: "아래 제품을 삭제하시겠습니까?<br>제품명: "+row.prductNm + "<br>유효기간: " +row.prdValidDe+"<br>제조번호: "+row.mnfNo+"<br>일련번호: " + row.mnfSeq content: "아래 제품을 삭제하시겠습니까?<br>제품명: "+row.prductNm + "<br>유효기간: " +row.prdValidDe+"<br>제조번호: "+row.mnfNo+"<br>일련번호: " + row.mnfSeq
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { , onOK: () => {
$P.productList.remove($P.productList.getCurrent().keyCnt); $P.productList.remove($P.productList.getCurrent().keyCnt);
} }
@ -576,7 +617,7 @@
$P.fnChangeDsusePrvCd = () => { $P.fnChangeDsusePrvCd = () => {
// validate 확인 // validate 확인
let checkData = $("#dsusePrvCd--${pageName} option:selected").val(); let checkData = $("#dsusePrvCd--${pageName} option:selected").val();
if (checkData =="01" || checkData =="02") { if (checkData ==="01" || checkData ==="02") {
$("#dsuseAcdtDe--${pageName}").prop('disabled', false); $("#dsuseAcdtDe--${pageName}").prop('disabled', false);
}else{ }else{
$("#dsuseAcdtDe--${pageName}").prop('disabled', true); $("#dsuseAcdtDe--${pageName}").prop('disabled', true);
@ -623,15 +664,20 @@
fnBarcodeSearch(barcode); fnBarcodeSearch(barcode);
} }
}); });
// 숫자만 입력받도록 input 요소에 이벤트 리스너 추가
$("input[name='dsuseQy']").on('input', function() {
this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');
});
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
} }
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.initForm = () => {
if($("input[name='prgrsSttsCd']").val() == '99' || ${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) { if($("input[name='prgrsSttsCd']").val() === '99' || ${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) {
$("#btnSave--${pageName}").prop("disabled", true); $("#btnSave--${pageName}").prop("disabled", true);
} }
initDatepicker("bssh--${pageName}"); AppSupport.initDatepicker("bssh--${pageName}");
$("#dsuseAcdtDe--${pageName}").datepicker("setDate", new Date()); $("#dsuseAcdtDe--${pageName}").datepicker("setDate", new Date());
} }
@ -654,7 +700,7 @@
for(let p of productInfo){ for(let p of productInfo){
p.keyCnt = (""+prdRowKey++); p.keyCnt = (""+prdRowKey++);
for(let f of fileInfo){ for(let f of fileInfo){
if(p.dscdmngSn == f.SUB_TYPE){ if(p.dscdmngSn === f.SUB_TYPE){
p.fileInfo = f; p.fileInfo = f;
} }
} }

@ -92,13 +92,13 @@
<th class="cmn" style="width: 170.141px;">관할관청</th> <th class="cmn" style="width: 170.141px;">관할관청</th>
<th class="cmn" style="width: 120.141px;">폐기관리번호</th> <th class="cmn" style="width: 120.141px;">폐기관리번호</th>
<th class="cmn" style="width: 110.469px;">폐기일자</th> <th class="cmn" style="width: 110.469px;">폐기일자</th>
<th class="cmn" style="width: 150px;">폐기구분</th>
<th class="cmn" style="width: 150px;">폐기방법</th> <th class="cmn" style="width: 150px;">폐기방법</th>
<th class="cmn" style="width: 300.469px;">업체명</th> <th class="cmn" style="width: 300.469px;">업체명</th>
<th class="cmn" style="width: 90px;">폐기건수</th> <th class="cmn" style="width: 90px;">폐기건수</th>
<th class="cmn" style="width: 160.469px;">처리상태</th> <th class="cmn" style="width: 160.469px;">처리상태</th>
<th class="cmn" style="width: 180.469px;">폐기사유</th> <th class="cmn" style="width: 180.469px;">폐기사유</th>
<th class="cmn" style="width: 110.141px;">사고발생일</th> <th class="cmn" style="width: 110.141px;">사고발생일</th>
<th class="cmn" style="width: 150px;">폐기구분</th>
<th class="cmn" style="width: 200.469px;">폐기장소</th> <th class="cmn" style="width: 200.469px;">폐기장소</th>
<th class="cmn" style="width: 110.141px;">취급일자</th> <th class="cmn" style="width: 110.141px;">취급일자</th>
</tr> </tr>
@ -111,13 +111,13 @@
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DEPT_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DEPT_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSCDMNG_ID}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSCDMNG_ID}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_DE}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_DE}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_SE_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_MTH_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_MTH_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{BSSH_NM}</td> <td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{BSSH_NM}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{RND_DTL_RPT_CNT}</td> <td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{RND_DTL_RPT_CNT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRGRS_STTS_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRGRS_STTS_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_PRV_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_PRV_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_ACDT_DE}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_ACDT_DE}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_SE_NM}</td>
<td class="cmn" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_LOC}</td> <td class="cmn" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_LOC}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{HDR_DE}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{HDR_DE}</td>
</tr> </tr>
@ -303,32 +303,11 @@
bsshCd: row.BSSH_CD, bsshCd: row.BSSH_CD,
rprsntvNm: row.RPRSNTV_NM, rprsntvNm: row.RPRSNTV_NM,
prmisnNo: row.PRMISN_NO, prmisnNo: row.PRMISN_NO,
bizrno: row.BIZR_NO, bizrno: row.BIZRNO,
dsusePrvCd: row.DSUSE_PRV_CD, dsusePrvCd: row.DSUSE_PRV_CD,
dsuseAcdtDe: row.DSUSE_ACDT_DE, dsuseAcdtDe: row.DSUSE_ACDT_DE,
prgrsSttsCd: row.PRGRS_STTS_CD prgrsSttsCd: row.PRGRS_STTS_CD
}; };
// let productDS = $P.detailControl.dataset.getDataset();
// if(productDS.length > 0){
// let newArr = [];
// for(let product of productDS){
// let newObj = {};
// newObj.dscdmngSn = product.DSCDMNG_SN;
// newObj.prductNm = product.PRDUCT_NM;
// newObj.prductCd = product.PRDUCT_CD;
// newObj.prdValidDe = product.PRD_VALID_DE;
// newObj.mnfNo = product.MNF_NO;
// newObj.mnfSeq = product.MNF_SEQ;
// newObj.minDistbQy = product.MIN_DISTB_QY;
// newObj.minDistbUnit = product.MIN_DISTB_UNIT;
// newObj.pceQy = product.PCE_QY;
// newObj.pceUnit = product.PCE_UNIT;
// newObj.dsuseQy = product.DSUSE_QY;
// newArr.push(newObj);
// }
// params.productList = JSON.stringify(newArr);
//
// }
} }
ajax.get({ ajax.get({
@ -365,8 +344,8 @@
dialog.alert({ dialog.alert({
content:"삭제되었습니다.", content:"삭제되었습니다.",
init : () => { init : () => {
setDialogZindex(); AppSupport.setDialogZindex();
focusClose(); AppSupport.focusClose();
}, },
onClose : () => { onClose : () => {
$P.control.reload({all : true}); $P.control.reload({all : true});
@ -469,7 +448,7 @@
} }
dialog.alert({ dialog.alert({
content: "자료를 삭제할 경우 복구가 불가능합니다.<br>아래 자료를 삭제하시겠습니까?<br>폐기관리번호: "+row.DSCDMNG_ID + "<br>업체명: " +row.BSSH_NM+"<br>폐기건수: "+row.RND_DTL_RPT_CNT+"<br>폐기사유: " + row.DSUSE_PRV_NM content: "자료를 삭제할 경우 복구가 불가능합니다.<br>아래 자료를 삭제하시겠습니까?<br>폐기관리번호: "+row.DSCDMNG_ID + "<br>업체명: " +row.BSSH_NM+"<br>폐기건수: "+row.RND_DTL_RPT_CNT+"<br>폐기사유: " + row.DSUSE_PRV_NM
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { , onOK: () => {
$P.control.removeDsuseMgt(row.DSCDMNG_ID); $P.control.removeDsuseMgt(row.DSCDMNG_ID);
} }
@ -525,7 +504,7 @@
} }
// DataTables(그리드) // DataTables(그리드)
let cellDefs = getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)") let cellDefs = AppSupport.getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)")
, $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); , $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
$P.control.query.cellDefs = cellDefs; $P.control.query.cellDefs = cellDefs;
@ -578,13 +557,13 @@
}); });
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고) // DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
fnMakeResizableTable($("#table-responsive--${pageName}")[0]); Componentization.fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
// DataTables 스크롤 이벤트 생성 // DataTables 스크롤 이벤트 생성
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList); Componentization.fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
// 하단 테이블 행 번호 표시 // 하단 테이블 행 번호 표시
fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}Detail') Componentization.fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}Detail')
, (tr)=>{ return $(tr).find("td.row-num")[0]; } , (tr)=>{ return $(tr).find("td.row-num")[0]; }
, (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } } , (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } }
); );
@ -603,8 +582,8 @@
searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); }); searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); });
// 기본 데이터 설정 // 기본 데이터 설정
initDatepicker("frmSearch--${pageName}"); // 달력 초기화 AppSupport.initDatepicker("frmSearch--${pageName}"); // 달력 초기화
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작 $("#schDateFrom--${pageName}").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); $("#schDateTo--${pageName}").datepicker("setDate", new Date());
$('#schSggCd--${pageName}').val("${currentUser.deptCode}"); $('#schSggCd--${pageName}').val("${currentUser.deptCode}");

@ -125,7 +125,6 @@
</li> </li>
</template> </template>
<script src="<c:url value="/webjars/applib/js/cmmnDateUtil.js?${ver}"/>"></script>
<script> <script>
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
@ -158,10 +157,14 @@
document.getElementById("rsltImgList").innerHTML = ""; document.getElementById("rsltImgList").innerHTML = "";
$('#btnImgAdd--${pageName}').prop('disabled', false); $('#btnImgAdd--${pageName}').prop('disabled', false);
$('#btnImgDel--${pageName}').prop('disabled', false); $('#btnImgDel--${pageName}').prop('disabled', false);
$('#dsuseLoc--${pageName}')
.val('')
.prop('disabled', false);
let param = { let param = {
dscdmngId: $("#dscdmngId--${pageName}").val(), dscdmngId: $("#dscdmngId--${pageName}").val(),
dsuseDe: $("#dsuseDe--${pageName}").val().replace(/-/g, ""), dsuseDe: $("#dsuseDe--${pageName}").val().replace(/-/g, ""),
dsuseSeCd: $("#dsuseSeCd--${pageName}").val(),
dsuseMthCd: $("#dsuseMthCd--${pageName}").val(), dsuseMthCd: $("#dsuseMthCd--${pageName}").val(),
deptCd: "${currentUser.deptCode}" deptCd: "${currentUser.deptCode}"
}; };
@ -195,10 +198,11 @@
if(dscnmngIds.length > 1){ if(dscnmngIds.length > 1){
$('#dsuseDe--${pageName}').prop('disabled', true); $('#dsuseDe--${pageName}').prop('disabled', true);
$('#dsuseMthCd--${pageName}').prop('disabled', true); $('#dsuseMthCd--${pageName}').prop('disabled', true);
$('#dsuseSeCd--${pageName}').prop('disabled', true);
$('#dsuseLoc--${pageName}').prop('disabled', false);
$('#spnDsuseDe').show(); $('#spnDsuseDe').show();
$('#spnDsuseMthCd').show(); $('#spnDsuseMthCd').show();
document.getElementById("rsltImgList").innerHTML = '총 ' + dscnmngIds.length + '건 에서 폐기사진 공유<br>폐기사진 공유 폐기관리번호 : [' + dscnmngIds.filter(item => item != $("#dscdmngId--${pageName}").val()).join(', ') + ']'; document.getElementById("rsltImgList").innerHTML = '총 ' + dscnmngIds.length + '건 에서 폐기사진 공유<br>폐기사진 공유 폐기관리번호 : [' + dscnmngIds.filter(item => item != $("#dscdmngId--${pageName}").val()).join(', ') + ']';
} }
return; return;
@ -207,11 +211,16 @@
isImgSaved = false; isImgSaved = false;
$('#btnImgAdd--${pageName}').prop('disabled', true); $('#btnImgAdd--${pageName}').prop('disabled', true);
$('#btnImgDel--${pageName}').prop('disabled', true); $('#btnImgDel--${pageName}').prop('disabled', true);
let tagsTextArr = []; $('#dsuseLoc--${pageName}').prop('disabled', true);
if($('#dsuseLoc--${pageName}').val().length === 0){
$('#dsuseLoc--${pageName}').val(list[0].DSUSE_LOC);
}
let tagsTextArr = [];
for(let idx = 0; idx < list.length; idx++){ for(let idx = 0; idx < list.length; idx++){
let item = list[idx]; let item = list[idx];
tagsTextArr.push('폐기관리번호 : [ ' + item.DSCDMNG_ID + ' ]의 폐기사진 공유(총 ' + dscnmngIds.length + '건)<br>폐기일자 : [ ' + item.DSUSE_DE + ' ], 폐기방법 : [ ' + item.DSUSE_MTH_NM + ' ]'); tagsTextArr.push('폐기관리번호 : [ ' + item.DSCDMNG_ID + ' ]의 폐기사진 공유(총 ' + dscnmngIds.length + '건)<br>폐기일자 : [ ' + item.DSUSE_DE + ' ], 폐기방법 : [ ' + item.DSUSE_MTH_NM + ' ], 폐기장소 : [ ' + item.DSUSE_LOC + ' ]');
} }
document.getElementById("rsltImgList").innerHTML = tagsTextArr.join(""); document.getElementById("rsltImgList").innerHTML = tagsTextArr.join("");
if(isOnloadExistRsltImg && list.length > 0) isRsltImgRemove = true; if(isOnloadExistRsltImg && list.length > 0) isRsltImgRemove = true;
@ -280,7 +289,7 @@
// 메시지 출력 // 메시지 출력
dialog.alert({ dialog.alert({
content: showMessage content: showMessage
, init: () => { setDialogZindex(); } , init: () => { AppSupport.setDialogZindex(); }
, onOK: () => { } , onOK: () => { }
}); });
@ -302,7 +311,7 @@
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.control.infoSize , size : $P.control.infoSize
, onClose : () => { $P.control.setData(); } , onClose : () => { $P.control.setData([]); }
}); });
} }
}); });
@ -333,7 +342,7 @@
dialog.alert({ dialog.alert({
content: "변경된 내용이 없습니다.", content: "변경된 내용이 없습니다.",
init: () => { init: () => {
focusOK(); AppSupport.focusOK();
} }
}); });
return; return;
@ -342,7 +351,7 @@
//const msg = "현재 " + $P.control.prefixName + " 정보를 저장 하시겠습니까?" + isRsltImgRemove ? "<br>현재 등록된 이미지 삭제" : ""; //const msg = "현재 " + $P.control.prefixName + " 정보를 저장 하시겠습니까?" + isRsltImgRemove ? "<br>현재 등록된 이미지 삭제" : "";
dialog.alert({ dialog.alert({
content: (isRsltImgRemove ? "현재 등록된 이미지는 삭제 됩니다<br>[기등록 이미지 사용]<br>" : "") + $P.control.prefixName + " 정보를 저장 하시겠습니까?" content: (isRsltImgRemove ? "현재 등록된 이미지는 삭제 됩니다<br>[기등록 이미지 사용]<br>" : "") + $P.control.prefixName + " 정보를 저장 하시겠습니까?"
, init: () => setDialogZindex() , init: () => AppSupport.setDialogZindex()
, onOK: () => { , onOK: () => {
upload({ upload({
url: wctx.url("/adds/nims/saveDsuseMgtRslt.do") url: wctx.url("/adds/nims/saveDsuseMgtRslt.do")
@ -460,7 +469,7 @@
// 저장 // 저장
$P.fnSave = () => { $P.fnSave = () => {
// validate 확인 // validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; if (!AppSupport.customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
let rsltData = $P.formFields.get(); let rsltData = $P.formFields.get();
if(rsltData.hdrDe == ""){ if(rsltData.hdrDe == ""){
@ -528,7 +537,7 @@
// 버튼 이벤트 // 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장 $("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
$("#dsuseDe--${pageName}, #dsuseMthCd--${pageName}").on("change", () => { $("#dsuseDe--${pageName}, #dsuseMthCd--${pageName}, #dsuseSeCd--${pageName}").on("change", () => {
isImgSaved = true; isImgSaved = true;
isRsltImgRemove = false; isRsltImgRemove = false;
if(initDataset) searchRsltImgList(); if(initDataset) searchRsltImgList();
@ -559,7 +568,7 @@
searchForm.find("input[type='hidden']").val(""); searchForm.find("input[type='hidden']").val("");
searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); }); searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); });
initDatepicker("frmEdit--${pageName}"); // 달력 초기화 AppSupport.initDatepicker("frmEdit--${pageName}"); // 달력 초기화
if(${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) { if(${currentUser.hasAuthorities("ROLE_MANAGER")} || ${currentUser.hasAuthorities("ROLE_ADMIN")}) {
$("#btnSave--${pageName}").prop("disabled", true); $("#btnSave--${pageName}").prop("disabled", true);
@ -606,7 +615,7 @@
} }
try{ try{
promiseArr.push(fnCreateFileFromFileInfo(f)); promiseArr.push(AddsSupport.fnCreateFileFromFileInfo(f));
}catch(e){ }catch(e){
console.log(e); console.log(e);
} }

@ -87,13 +87,13 @@
<th class="cmn" style="width: 170.141px;">관할관청</th> <th class="cmn" style="width: 170.141px;">관할관청</th>
<th class="cmn" style="width: 120.141px;">폐기관리번호</th> <th class="cmn" style="width: 120.141px;">폐기관리번호</th>
<th class="cmn" style="width: 110.469px;">폐기일자</th> <th class="cmn" style="width: 110.469px;">폐기일자</th>
<th class="cmn" style="width: 150px;">폐기구분</th>
<th class="cmn" style="width: 150px;">폐기방법</th> <th class="cmn" style="width: 150px;">폐기방법</th>
<th class="cmn" style="width: 250.469px;">업체명</th> <th class="cmn" style="width: 250.469px;">업체명</th>
<th class="cmn" style="width: 90px;">폐기건수</th> <th class="cmn" style="width: 90px;">폐기건수</th>
<th class="cmn" style="width: 160.469px;">처리상태</th> <th class="cmn" style="width: 160.469px;">처리상태</th>
<th class="cmn" style="width: 180.469px;">폐기사유</th> <th class="cmn" style="width: 180.469px;">폐기사유</th>
<th class="cmn" style="width: 120.141px;">사고발생일</th> <th class="cmn" style="width: 120.141px;">사고발생일</th>
<th class="cmn" style="width: 150px;">폐기구분</th>
<th class="cmn" style="width: 200.469px;">폐기장소</th> <th class="cmn" style="width: 200.469px;">폐기장소</th>
<th class="cmn" style="width: 110.141px;">취급일자</th> <th class="cmn" style="width: 110.141px;">취급일자</th>
</tr> </tr>
@ -106,13 +106,13 @@
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DEPT_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DEPT_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSCDMNG_ID}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSCDMNG_ID}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_DE}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_DE}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_SE_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_MTH_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_MTH_NM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{BSSH_NM}</td> <td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{BSSH_NM}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{RND_DTL_RPT_CNT}</td> <td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{RND_DTL_RPT_CNT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRGRS_STTS_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRGRS_STTS_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_PRV_NM}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_PRV_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_ACDT_DE}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_ACDT_DE}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_SE_NM}</td>
<td class="cmn" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_LOC}</td> <td class="cmn" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_LOC}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{HDR_DE}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{HDR_DE}</td>
</tr> </tr>
@ -295,6 +295,7 @@
if(isDtl && row.PRGRS_STTS_CD != "01") dialogTitle = "폐기 결과[통보] 상세"; if(isDtl && row.PRGRS_STTS_CD != "01") dialogTitle = "폐기 결과[통보] 상세";
if (typeof row == "undefined" || row == null || row == "") return; if (typeof row == "undefined" || row == null || row == "") return;
let params = { let params = {
dscdmngId: row.DSCDMNG_ID, dscdmngId: row.DSCDMNG_ID,
bsshNm: row.BSSH_NM, bsshNm: row.BSSH_NM,
@ -491,7 +492,7 @@
} }
// DataTables(그리드) // DataTables(그리드)
let cellDefs = getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)") let cellDefs = AppSupport.getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)")
, $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); , $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
$P.control.query.cellDefs = cellDefs; $P.control.query.cellDefs = cellDefs;
@ -539,13 +540,13 @@
}); });
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고) // DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
fnMakeResizableTable($("#table-responsive--${pageName}")[0]); Componentization.fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
// DataTables 스크롤 이벤트 생성 // DataTables 스크롤 이벤트 생성
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList); Componentization.fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
// 하단 테이블 행 번호 표시 // 하단 테이블 행 번호 표시
fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}Detail') Componentization.fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}Detail')
, (tr)=>{ return $(tr).find("td.row-num")[0]; } , (tr)=>{ return $(tr).find("td.row-num")[0]; }
, (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } } , (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } }
); );
@ -564,8 +565,8 @@
searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); }); searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); });
// 기본 데이터 설정 // 기본 데이터 설정
initDatepicker("frmSearch--${pageName}"); // 달력 초기화 AppSupport.initDatepicker("frmSearch--${pageName}"); // 달력 초기화
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작 $("#schDateFrom--${pageName}").datepicker("setDate", DateSupport.getAddDay(-7)); // 부과 제외 일자 시작
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료 $("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료
$('#schSttsCd--${pageName}').val('01'); $('#schSttsCd--${pageName}').val('01');

@ -10,14 +10,13 @@
<div class="container-search"> <div class="container-search">
<!-- hidden --> <!-- hidden -->
<div class="row my-0 mx-1 g-0" style="align-items: baseline"> <div class="row my-0 mx-1 g-0" style="align-items: baseline">
<div class="col-md-8"> <div class="col-md-9">
<label for="ProductNm--${pageName}" class="w-px-90 bg-lighter pe-2 col-form-label text-sm-end">제품명/코드</label> <label for="ProductNm--${pageName}" class="w-px-90 bg-lighter pe-2 col-form-label text-sm-end">제품명/코드</label>
<input type="text" class="form-control w-px-100" id="productNm--${pageName}" name="schProductNm" > <input type="text" class="form-control w-px-100" id="productNm--${pageName}" name="schProductNm">
<input type="text" class="form-control w-px-120" id="productCd--${pageName}" name="schProductCd" > <input type="text" class="form-control w-px-150" id="productCd--${pageName}" name="schProductCd" maxlength="13" oninput="this.value = this.value.slice(0, 13)">
</div> </div>
<div class="col-md-4"> <div class="col-md-3">
<button type="button" class="btn btn-search w-px-50" id="btnSearch--${pageName}" title="검색">검색</button>&nbsp; <button type="button" class="btn btn-search w-px-50" id="btnSearch--${pageName}" title="검색">NIMS 검색</button>&nbsp;
<button type="button" class="btn btn-primary w-px-80" id="btnSearch2--${pageName}" title="검색">NIMS 검색</button>
</div> </div>
</div> </div>
</div> </div>
@ -25,10 +24,11 @@
<!-- / 업무 버튼 표시 --> <!-- / 업무 버튼 표시 -->
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}"> <div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsiv-0--${pageName}"> <div class="table-responsive ox-scroll oy-scroll h-px-600" id="table-responsive-0--${pageName}">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info"> <table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead> <thead class="sticky-thead">
<tr> <tr>
<th class="cmn" style="width: 70px;">No.</th>
<th class="sorting" style="width: 146.156px;">제품코드</th> <th class="sorting" style="width: 146.156px;">제품코드</th>
<th class="sorting" style="width: 350.141px;">제품명</th> <th class="sorting" style="width: 350.141px;">제품명</th>
<th class="sorting" style="width: 120.469px;">유통단위</th> <th class="sorting" style="width: 120.469px;">유통단위</th>
@ -42,6 +42,7 @@
</tbody> </tbody>
<template id="${infoPrefix}Row--${pageName}"> <template id="${infoPrefix}Row--${pageName}">
<tr data-key="{keyCnt}"> <tr data-key="{keyCnt}">
<td class="row-num text-end" onclick="{onclick}" ondblclick="{ondblclick}"></td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td> <td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdMinDistbQy} {stdPackngStleNm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdMinDistbQy} {stdPackngStleNm}</td>
@ -64,31 +65,35 @@
<label id="${infoPrefix}Paging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label> <label id="${infoPrefix}Paging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
<ul id="${infoPrefix}Paging--${pageName}" class="pagination pagination-primary" style="display: none;"> <ul id="${infoPrefix}Paging--${pageName}" class="pagination pagination-primary" style="display: none;">
</ul> </ul>
<!-- FIXME:: NIMS API 개발 완료후 적용 -->
<%--
<span class="container-window-btn-right">
<input type="checkbox" id="chkBsshCd--${pageName}" name="chkBsshCd" title="업체코드적용" style="align-items: baseline"/>&nbsp;<strong>신규API 업체코드 적용</strong>
</span>
--%>
</div> </div>
</div> </div>
<div class="card col-6"> <div class="card col-6">
<form id="frmSearch--${pageName}Detail" name="frmSearchDetail"> <form id="frmSearch--${pageName}Detail" name="frmSearchDetail">
<input type="hidden" id="bsshCd" name="bsshCd">
<div class="container-search"> <div class="container-search">
<!-- hidden --> <!-- hidden -->
<div class="row my-0 mx-1 g-0" style="align-items: baseline"> <div class="row my-0 mx-1 g-0" style="align-items: baseline">
<div class="col-md-5"> <div class="col-md-5">
<select id="schOpt--${pageName}" name="schOpt" class="form-selectxit"> <select id="schOpt--${pageName}" name="schOpt" class="form-select" style="width: 106px !important;">
<option value="1">제조번호</option> <option value="1">제조번호</option>
<option value="2">일련번호</option> <option value="2">일련번호</option>
</select> </select>
<input type="text" class="form-control w-60" id="schText--${pageName}" name="schText" > <input type="text" class="form-control w-px-100" id="schText--${pageName}" name="schText" >
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<label for="schPrdValidDe--${pageName}" class="w-px-90 bg-lighter pe-2 col-form-label text-sm-end">유효기간</label> <label for="schPrdValidDe--${pageName}" class="w-px-90 bg-lighter pe-2 col-form-label text-sm-end">유효기간</label>
<input type="text" class="form-control w-50" id="schPrdValidDe--${pageName}" name="schPrdValidDe" data-fmt-type="day" data-map="schPrdValidDe" autocomplete="off" title="유효기간" /> <input type="text" class="form-control w-50" id="schPrdValidDe--${pageName}" name="schPrdValidDe" data-fmt-type="day" data-map="schPrdValidDe" autocomplete="off" title="유효기간" />
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<button type="button" class="btn btn-primary w-px-90" id="btnSearch3--${pageName}" title="검색">NIMS 검색</button> <button type="button" class="btn btn-primary w-px-60" id="btnSearchDtl--${pageName}" title="검색">NIMS 검색</button>
</div> </div>
</div> </div>
<div>
<span style="padding-left: 50px; font-weight: bold; color: #696cff">유효기간(제조번호 또는 시리얼번호 조회 결과 내에서 조회)</span>
</div>
</div> </div>
</form> </form>
<!-- 업무 버튼 표시 --> <!-- 업무 버튼 표시 -->
@ -96,23 +101,23 @@
</div> </div>
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_1_wrapper--${pageName}"> <div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_1_wrapper--${pageName}">
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive-1--${pageName}"> <div class="table-responsive ox-scroll oy-scroll h-px-600" id="table-responsive-1--${pageName}">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_1--${pageName}" aria-describedby="DataTables_Table_1_info"> <table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_1--${pageName}" aria-describedby="DataTables_Table_1_info">
<thead> <thead class="sticky-thead">
<tr> <tr>
<%-- <th class="sorting" style="width: 146.156px;">제품코드</th>--%> <th class="cmn" style="width: 70px;">No.</th>
<%-- <th class="sorting" style="width: 330.141px;">제품명</th>--%> <th class="sorting" style="width: 146px;">제품코드</th>
<th class="sorting" style="width: 120.469px;">유효기간</th> <th class="sorting" style="width: 110px;">유효기간</th>
<th class="sorting" style="width: 160.469px;">제조번호</th> <th class="sorting" style="width: 155px;">제조번호</th>
<th class="sorting" style="width: 160.469px;">제조일련번호</th> <th class="sorting" style="width: 155px;">제조일련번호</th>
</tr> </tr>
</thead> </thead>
<tbody id="tbody--${pageName}Detail"> <tbody id="tbody--${pageName}Detail">
</tbody> </tbody>
<template id="${infoPrefix}Row--${pageName}Detail"> <template id="${infoPrefix}Row--${pageName}Detail">
<tr data-key="{keyCnt}"> <tr data-key="{keyCnt}">
<%-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>--%> <td class="row-num text-end" onclick="{onclick}" ondblclick="{ondblclick}"></td>
<%-- <td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td>--%> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdValidDe}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdValidDe}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{mnfNo}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{mnfNo}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{mnfSeq}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{mnfSeq}</td>
@ -132,6 +137,7 @@
<ul id="${infoPrefix}DetailPaging--${pageName}" class="pagination pagination-primary" style="display: none;"> <ul id="${infoPrefix}DetailPaging--${pageName}" class="pagination pagination-primary" style="display: none;">
</ul> </ul>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<input type="checkbox" id="chkDtlBsshCd--${pageName}" name="chkDtlBsshCd" title="업체코드적용" style="align-items: baseline"/>&nbsp;<strong>신규 API 업체코드 적용</strong>
<!-- 업무 버튼 --> <!-- 업무 버튼 -->
<button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="선택">선택</button> <button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="선택">선택</button>
</span> </span>
@ -195,7 +201,7 @@
$P.detailControl = new DatasetControl({ $P.seqInfoControl = new DatasetControl({
urls : { urls : {
load : wctx.url("/adds/nims/getNimsProductSeqInfo.do"), // 시리얼번호 검색 load : wctx.url("/adds/nims/getNimsProductSeqInfo.do"), // 시리얼번호 검색
} }
@ -227,7 +233,7 @@
}); });
// $P.control 설정 // $P.control 설정
$P.detailControl.defaultFetchSize = FETCH_MD; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30 $P.seqInfoControl.defaultFetchSize = FETCH_MD; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
@ -237,15 +243,15 @@
// Dataset 변경 이벤트 // Dataset 변경 이벤트
$P.control.onDatasetChange = (obj, option) => { $P.control.onDatasetChange = (obj, option) => {
$P.renderList(obj.${infoPrefix}Total, option); $P.renderList(obj.totalCount, option);
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({ $("#${infoPrefix}Paging--${pageName}").setPagingInfo({
list: $P.control.dataset list: $P.control.dataset
, prefix: "${infoPrefix}Paging--${pageName}" , prefix: "${infoPrefix}Paging--${pageName}"
, start: obj.${infoPrefix}Start , start: obj.${infoPrefix}Start
, totalSize: $P.control.dataset.length , totalSize: obj.totalCount
, fetchSize: obj.${infoPrefix}Fetch , fetchSize: obj.${infoPrefix}Fetch
, func: "pageObject['${pageName}'].control.load({index})" //, func: "pageObject['${pageName}'].control.load({index})"
}); });
@ -254,20 +260,20 @@
// 현재 선택 자료 변경 이벤트 // 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = item => { $P.control.onCurrentChange = item => {
if (!item) { if (!item) {
$P.detailControl.setData([]); $P.seqInfoControl.setData([]);
$("#btnSearch3--${pageName}").prop("disabled", true); $("#btnSearchDtl--${pageName}").prop("disabled", true);
return; return;
} }
let key = item.data.keyCnt; let key = item.data.keyCnt;
$("#tbody--${pageName}").setCurrentRow(key); $("#tbody--${pageName}").setCurrentRow(key);
$("#btnSearch3--${pageName}").prop("disabled", false); $("#btnSearchDtl--${pageName}").prop("disabled", false);
$P.fnDetailSearchList(); $P.fnDetailSearchList();
} }
// 현재 선택 자료 변경 이벤트 // 현재 선택 자료 변경 이벤트
$P.detailControl.onCurrentChange = (item) => { $P.seqInfoControl.onCurrentChange = (item) => {
if (!item) return; if (!item) return;
let key = item.data.keyCnt; let key = item.data.keyCnt;
@ -275,20 +281,17 @@
$("#tbody--${pageName}Detail").setCurrentRow(key); $("#tbody--${pageName}Detail").setCurrentRow(key);
}; };
$P.detailControl.onDatasetChange = (obj, option) => { $P.seqInfoControl.onDatasetChange = (obj, option) => {
$P.renderDetailList(obj.totalCount, option); $P.renderDetailList(obj.totalCount, option);
$("#${infoPrefix}DetailPaging--${pageName}").setPagingInfo({ $("#${infoPrefix}DetailPaging--${pageName}").setPagingInfo({
list: $P.detailControl.dataset list: $P.seqInfoControl.dataset
, prefix: "${infoPrefix}DetailPaging--${pageName}" , prefix: "${infoPrefix}DetailPaging--${pageName}"
, totalSize: obj.totalCount , totalSize: obj.totalCount
}); });
}; };
// 저장 callback
// 저장
/************************************************************************** /**************************************************************************
* DataTables 이벤트 * DataTables 이벤트
@ -299,30 +302,20 @@
let ${infoPrefix}List = $P.control.dataset; let ${infoPrefix}List = $P.control.dataset;
let empty = ${infoPrefix}List.empty; let empty = ${infoPrefix}List.empty;
// 업무별 DataTables(그리드) tr, td let trs = empty ?
let foundContent = document.getElementById("${infoPrefix}Row--${pageName}").content; [document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] :
let foundTr = $(foundContent).find("tr")[0].cloneNode(false); ${infoPrefix}List.inStrings(
let foundTds = $(foundContent).find("td"); document.getElementById("${infoPrefix}Row--${pageName}").innerHTML,
(str, dataItem) => str
foundTds.each(function() { .replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("keyCnt") + "');"));
foundTr.appendChild(this.cloneNode(true)); let noMore = (${infoPrefix}List.length >= totalSize);
}); let initScroll = ($P.control.query.pageNum < 2);
//
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("keyCnt") + "');");
// .replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()");
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML]
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
$("#tbody--${pageName}").html(trs.join());
$("#table-responsive-0--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
} }
$P.renderDetailList = (totalSize, option) => { $P.renderDetailList = (totalSize, option) => {
let ${infoPrefix}DetailList = $P.detailControl.dataset; let ${infoPrefix}DetailList = $P.seqInfoControl.dataset;
let empty = ${infoPrefix}DetailList.empty; let empty = ${infoPrefix}DetailList.empty;
let trs = empty ? let trs = empty ?
@ -330,16 +323,13 @@
${infoPrefix}DetailList.inStrings( ${infoPrefix}DetailList.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}Detail").innerHTML, <%-- from template#${infoPrefix}Row --%> document.getElementById("${infoPrefix}Row--${pageName}Detail").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].detailControl.setCurrent('" + dataItem.getValue("keyCnt") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].seqInfoControl.setCurrent('" + dataItem.getValue("keyCnt") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()") .replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()"));
);
let noMore = (${infoPrefix}DetailList.length >= totalSize); let noMore = (${infoPrefix}DetailList.length >= totalSize);
let initScroll = ($P.detailControl.query.pageNum < 2); let initScroll = ($P.seqInfoControl.query.pageNum < 2);
$("#table-responsive-1--${pageName}")[0].changeContent(trs.join(), initScroll, noMore); $("#table-responsive-1--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
} }
/************************************************************************** /**************************************************************************
* 사용자 함수(function) * 사용자 함수(function)
@ -349,12 +339,33 @@
* 버튼 clickEvent * 버튼 clickEvent
**************************************************************************/ **************************************************************************/
//그리드(좌)조회(새로 조회) //그리드(좌)조회(새로 조회)
$P.fnSearchList = (dbSkipYn) => { $P.fnSearchList = () => {
if($P.formFields.get().schProductNm.length + $P.formFields.get().schProductCd.length === 0){
dialog.alert({
content: "상품명 또는 상품번호중 하나는 필수입니다."
});
return false;
}
// if($P.formFields.get().schProductNm.length !== 0 && $P.formFields.get().schProductNm.length < 2){
// dialog.alert({
// content: "상품명은 2자 이상으로 조회해 주세요."
// });
// return false;
// }
// FIXME:: NIMS API 개발 완료후 적용
let bsshCd = '${bsshCd}';
<%--if(!$('#chkBsshCd--${pageName}').is(":checked")){--%>
<%-- bsshCd = '';--%>
<%--}--%>
$P.control.query = { $P.control.query = {
... $P.formFields.get(), ... $P.formFields.get(),
pg: 1,
p: $P.formFields.get().schProductCd, p: $P.formFields.get().schProductCd,
pn: $P.formFields.get().schProductNm, pn: $P.formFields.get().schProductNm,
dbSkipYn: dbSkipYn? dbSkipYn : "N", bc: bsshCd, //업체코드
userId: "${currentUser.account}" userId: "${currentUser.account}"
}; };
$P.control.query.fetchSize = FETCH_XXL; // 한번에 조회되는 자료 건수 $P.control.query.fetchSize = FETCH_XXL; // 한번에 조회되는 자료 건수
@ -362,36 +373,52 @@
$P.control.load(1); $P.control.load(1);
} }
$P.scrollList = () => {
$P.control.query.pg = $P.control.query.pageNum + 1;
$P.control.load($P.control.query.pageNum + 1);
}
//그리드(우)조회(새로 조회) //그리드(우)조회(새로 조회)
$P.fnDetailSearchList = () => { $P.fnDetailSearchList = () => {
$P.detailControl.query = { if(!$P.control.dataset.getCurrent()?.prductCd){
fg: $('#schOpt--productMain').val(), // 1-제조번호, 2-시리얼번호 return false;
}
let bsshCd = '${bsshCd}';
if(!$('#chkDtlBsshCd--${pageName}').is(":checked")){
bsshCd = '';
}
$P.seqInfoControl.query = {
fg: $('#schOpt--productPopup').val(), // 1-제조번호, 2-시리얼번호
pg: 1, pg: 1,
p: $P.control.dataset.getCurrent().prductCd , //제품코드 p: $P.control.dataset.getCurrent().prductCd , //제품코드
prdValidDe: $("input[name='schPrdValidDe']").val().replaceAll("-", ""), t: $('#schText--productPopup').val(), //제조번호 또는 시리얼번호
t: $('#schText--productMain').val(), //제조번호 또는 시리얼번호 vd: $("input[name='schPrdValidDe']").val().replaceAll("-", ""),
bc: bsshCd, //업체코드
userId: "${currentUser.account}" userId: "${currentUser.account}"
}; };
$P.detailControl.query.fetchSize = FETCH_MD; // 한번에 조회되는 자료 건수 $P.seqInfoControl.query.fetchSize = FETCH_MD; // 한번에 조회되는 자료 건수
$P.detailControl.query.delYn = "N"; // 삭제 여부 $P.seqInfoControl.query.delYn = "N"; // 삭제 여부
$P.detailControl.load(1); $P.seqInfoControl.load(1);
} }
//그리드(우)조회(스크롤) //그리드(우)조회(스크롤)
$P.scrollDetailDataList = () => { $P.scrollDetailDataList = () => {
$P.seqInfoControl.query.pg = $P.seqInfoControl.query.pageNum + 1;
$P.detailControl.query.pg = $P.detailControl.query.pageNum + 1; $P.seqInfoControl.load($P.seqInfoControl.query.pageNum + 1);
$P.detailControl.load($P.detailControl.query.pageNum + 1);
} }
// 저장 // 저장
$P.fnSave = () => { $P.fnSave = () => {
let openPage = new AddsFormFields("#${openPage}"); let openPage = new AddsFormFields("#${openPage}");
productData = {...$P.control.getCurrent(), ...$P.detailControl.getCurrent()} productData = {...$P.control.getCurrent(), ...$P.seqInfoControl.getCurrent()}
openPage.set (null,productData); // formFields openPage.set (null,productData); // formFields
dialog.close("productMainDialog"); dialog.close("productPopupDialog");
} }
/************************************************************************** /**************************************************************************
@ -415,20 +442,31 @@
// 버튼 이벤트 // 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장 $("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList()); $("#btnSearch--${pageName}").on("click", () => $P.fnSearchList());
$("#btnSearch2--${pageName}").on("click", () => $P.fnSearchList("Y")); $("#btnSearchDtl--${pageName}").on("click", () => $P.fnDetailSearchList());
$("#btnSearch3--${pageName}").on("click", () => $P.fnDetailSearchList()); $("#chkDtlBsshCd--${pageName}").on("change", () => $P.fnDetailSearchList());
$("#frmSearch--${pageName} input").onEnterPress($P.fnSearchList); $("#frmSearch--${pageName} input").onEnterPress($P.fnSearchList);
$("#frmSearch--${pageName}Detail input").onEnterPress($P.fnDetailSearchList); $("#frmSearch--${pageName}Detail input").onEnterPress($P.fnDetailSearchList);
Componentization.fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}')
, (tr)=>{ return $(tr).find("td.row-num")[0]; }
, (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } }
);
Componentization.fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}Detail')
, (tr)=>{ return $(tr).find("td.row-num")[0]; }
, (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } }
);
} }
fnMakeScrollableTable($("#table-responsive-1--${pageName}")[0], $P.scrollDetailDataList); Componentization.fnMakeScrollableTable($("#table-responsive-0--${pageName}")[0], $P.scrollList);
Componentization.fnMakeScrollableTable($("#table-responsive-1--${pageName}")[0], $P.scrollDetailDataList);
// 초기 화면 설정 // 초기 화면 설정
$P.initForm = () => { $P.initForm = () => {
$("#btnSearch3--${pageName}").prop("disabled", true); $("#btnSearchDtl--${pageName}").prop("disabled", true);
} }
/************************************************************************** /**************************************************************************

@ -183,9 +183,18 @@ sggDepts.depts.onDatasetChange = obj => {
sggDepts.sggs.setData({sggList: ${sggs}}); sggDepts.sggs.setData({sggList: ${sggs}});
sggDepts.depts.setData({deptList: ${depts}}); sggDepts.depts.setData({deptList: ${depts}});
<c:if test="${!empty userInfo}">infoPrefixCtrl.setData([${userInfo}]);</c:if> var infoPrefixFields = new FormFields("#infoPrefix-form");
<c:if test="${!empty userInfo}">
var info = ${userInfo};
if (infoPrefixCtrl.dataset.empty)
infoPrefixCtrl.dataset.setData({userList: [info]});
else
infoPrefixCtrl.dataset.replace({data: info});
</c:if>
infoPrefixCtrl.setInfo = obj => { infoPrefixCtrl.setInfo = obj => {
infoPrefixFields.set(infoPrefixCtrl, obj);
obj = obj || infoPrefixCtrl.dataset.getCurrent("item"); obj = obj || infoPrefixCtrl.dataset.getCurrent("item");
let create = isEmpty(obj.data.USER_ACNT); let create = isEmpty(obj.data.USER_ACNT);
$("input[name='account']").prop("readonly", !create); $("input[name='account']").prop("readonly", !create);
@ -234,7 +243,7 @@ function saveinfoPrefix() {
dialog.alert({ dialog.alert({
content:"현재 prefixName 정보를 저장하시겠습니까?", content:"현재 prefixName 정보를 저장하시겠습니까?",
onOK:() => { onOK:() => {
infoPrefixCtrl.save(infoPrefixCtrl.toObject()); infoPrefixCtrl.save(infoPrefixFields.get());
} }
}); });
} }
@ -264,5 +273,7 @@ function setDepts(instCode) {
sggDepts.getDepts({instCode: instCode}); sggDepts.getDepts({instCode: instCode});
} }
$(infoPrefixCtrl.selector("[name='birthday']")).datePicker();
//# sourceURL=user-info.jsp //# sourceURL=user-info.jsp
</script> </script>

@ -7,7 +7,7 @@
<div class="d-flex flex-row justify-content-between p-3"> <div class="d-flex flex-row justify-content-between p-3">
<div> <div>
<div class="input-group"> <div class="input-group">
<select name="by" onchange="userCtrl.find('term').focus();" class="form-select"> <select name="by" onchange="userCtrl.find('name', 'term').focus();" class="form-select">
<option value="userName">이름</option> <option value="userName">이름</option>
<option value="userAccount">계정</option> <option value="userAccount">계정</option>
</select> </select>
@ -24,11 +24,11 @@
<table class="datatables-ajax table table-bordered dataTable no-footer"> <table class="datatables-ajax table table-bordered dataTable no-footer">
<thead name="userThead"> <thead name="userThead">
<tr><th tabindex="0" style="width: 158.828px; text-align:center;"><input onchange="userCtrl.select(this.checked);" type="checkbox" class="form-check-input"></th> <tr><th tabindex="0" style="width: 158.828px; text-align:center;"><input onchange="userCtrl.select(this.checked);" type="checkbox" class="form-check-input"></th>
<th data-field="USER_ACNT" class="sorting" style="width: 223.719px;">계정</th> <th style="width: 223.719px;">계정</th>
<th data-field="USER_NM" class="sorting" style="width: 146.156px;">이름</th> <th style="width: 146.156px;">이름</th>
<th class="sorting" style="width: 195.688px;">이메일</th> <th style="width: 195.688px;">이메일</th>
<th class="sorting" style="width: 160.141px;">전화번호(무선)</th> <th style="width: 160.141px;">전화번호(무선)</th>
<th class="sorting" style="width: 230.469px;">등록일자</th> <th style="width: 230.469px;">등록일자</th>
</tr> </tr>
</thead> </thead>
<tbody name="userList"> <tbody name="userList">
@ -62,8 +62,8 @@ var userCtrl = newUserControl();
userCtrl.search = () => { userCtrl.search = () => {
userCtrl.query = { userCtrl.query = {
by: userCtrl.find("by").value, by: userCtrl.find("name", "by").value,
term: userCtrl.find("term").value term: userCtrl.find("name", "term").value
}; };
userCtrl.load(1); userCtrl.load(1);
} }
@ -82,15 +82,15 @@ userCtrl.renderList = () => {
empty = userList.empty; empty = userList.empty;
let trs = empty ? let trs = empty ?
[userCtrl.find("userNotFound").innerHTML] : [userCtrl.find("name", "userNotFound").innerHTML] :
userList.inStrings( userList.inStrings(
userCtrl.find("userRow").innerHTML, userCtrl.find("name", "userRow").innerHTML,
(str, dataItem) => str (str, dataItem) => str
.replace(/{onclick}=""/gi, 'onclick="userCtrl.setCurrent(\'' + dataItem.getValue("USER_ID") + '\');"') .replace(/{onclick}=""/gi, 'onclick="userCtrl.setCurrent(\'{USER_ID}\');"')
.replace(/{ondblclick}=""/gi, 'ondblclick="userCtrl.getInfo(\'' + dataItem.getValue("USER_ID") + '\')"') .replace(/{ondblclick}=""/gi, 'ondblclick="userCtrl.getInfo({userID: \'{USER_ID}\'});"')
); );
userCtrl.find("userList").innerHTML = trs.join(""); userCtrl.find("name", "userList").innerHTML = trs.join("");
userCtrl.querySelector("[name='userThead'] th input[type='checkbox']").checked = false; userCtrl.find("[name='userThead'] th input[type='checkbox']").checked = false;
} }
userCtrl.onDatasetChange = obj => { userCtrl.onDatasetChange = obj => {
@ -116,12 +116,12 @@ userCtrl.onCurrentChange = item => {
userCtrl.onSelectionChange = selected => { userCtrl.onSelectionChange = selected => {
let userList = userCtrl.dataset; let userList = userCtrl.dataset;
let keys = selected.map(e => userList.getKey(e)); let keys = selected.map(e => userList.getKey(e));
userCtrl.querySelectorAll("[name='userList'] input[type='checkbox']") userCtrl.findAll("[name='userList'] input[type='checkbox']")
.forEach(node => { .forEach(node => {
node.checked = keys.includes(node.value); node.checked = keys.includes(node.value);
}); });
userCtrl.querySelectorAll(".enable-onfound") userCtrl.findAll(".enable-onfound")
.forEach(node => { .forEach(node => {
node.disabled = keys.length < 1; node.disabled = keys.length < 1;
}); });
@ -131,7 +131,6 @@ $(userCtrl.selector("[name='term']")).onEnterPress(userCtrl.search);
$(function(){ $(function(){
${onload} ${onload}
tableSorter(userCtrl, "th[data-field]");
userCtrl.setData({ userCtrl.setData({
userList:${userList}, userList:${userList},

@ -21,6 +21,7 @@
<!-- base --> <!-- base -->
<script src="<c:url value="/webjars/js/base/base.js"/>"></script> <script src="<c:url value="/webjars/js/base/base.js"/>"></script>
<script src="<c:url value="/webjars/js/base/dataset.js"/>"></script> <script src="<c:url value="/webjars/js/base/dataset.js"/>"></script>
<script src="<c:url value="/webjars/js/base/dataset-support.js"/>"></script>
<script src="<c:url value="/webjars/js/base/upload-support.js?${ver}"/>"></script> <script src="<c:url value="/webjars/js/base/upload-support.js?${ver}"/>"></script>
<script src="<c:url value="/webjars/js/base/code.js"/>"></script> <script src="<c:url value="/webjars/js/base/code.js"/>"></script>
<script src="<c:url value="/webjars/js/base/code-support.js"/>"></script> <script src="<c:url value="/webjars/js/base/code-support.js"/>"></script>
@ -31,22 +32,20 @@
<script src="<c:url value="/webjars/js/base/sgg-dept.js?${ver}"/>"></script> <script src="<c:url value="/webjars/js/base/sgg-dept.js?${ver}"/>"></script>
<script src="<c:url value="/webjars/js/base/authority.js"/>"></script> <script src="<c:url value="/webjars/js/base/authority.js"/>"></script>
<!-- 전체화면 비활성화 --> <!-- 전체화면 비활성화 -->
<script src="<c:url value="/webjars/3rd-party/sneat/libs/block-ui/block-ui.js"/>"></script> <script src="<c:url value="/webjars/3rd-party/sneat/libs/block-ui/block-ui.js"/>"></script>
<!-- 드래그앤드롭 정렬 -->
<script src="<c:url value="/webjars/3rd-party/sneat/libs/sortablejs/sortable.js"/>"></script> <script src="<c:url value="/webjars/3rd-party/sneat/libs/sortablejs/sortable.js"/>"></script>
<script src="<c:url value="/resources/js/base/addsFormFields.js?${ver}"/>"></script> <!-- 공통 유틸(applib) -->
<script src="<c:url value="/webjars/applib/js/app-base.js?${ver}"/>"></script>
<!-- 공통 유틸 --> <script src="<c:url value="/webjars/applib/js/string-support.js?${ver}"/>"></script>
<script src="<c:url value="/webjars/applib/js/cmmnUtil.js?${ver}"/>"></script> <script src="<c:url value="/webjars/applib/js/date-support.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/adds/cmmn/adds-cmmnUtil.js?${ver}"/>"></script> <script src="<c:url value="/webjars/applib/js/app-support.js?${ver}"/>"></script>
<!-- 날짜 관련 유틸 -->
<script src="<c:url value="/webjars/applib/js/cmmnDateUtil.js?${ver}"/>"></script>
<!-- 초기화 유틸 -->
<script src="<c:url value="/webjars/applib/js/initAfterPageLoad.js?${ver}"/>"></script>
<!-- 커스텀UI -->
<script src="<c:url value="/webjars/applib/js/componentization.js?${ver}"/>"></script> <script src="<c:url value="/webjars/applib/js/componentization.js?${ver}"/>"></script>
<!-- (adds) -->
<script src="<c:url value="/resources/js/adds/cmmn/adds-base.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/adds/cmmn/adds-support.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/adds/cmmn/adds-componentization.js?${ver}"/>"></script> <script src="<c:url value="/resources/js/adds/cmmn/adds-componentization.js?${ver}"/>"></script>

@ -53,6 +53,12 @@
${functions} ${functions}
var currentUserCtrl = newUserControl(); var currentUserCtrl = newUserControl();
currentUserCtrl.prefix = "currentUser"; currentUserCtrl.prefix = "currentUser";
currentUserCtrl.onSave = resp => {
if (resp.saved) {
dialog.alert("저장됐습니다.");
dialog.close(currentUserCtrl.prefixed("dialog"));
}
};
function currentUserInfo() { function currentUserInfo() {
currentUserCtrl.dataset.clear(); currentUserCtrl.dataset.clear();

@ -247,7 +247,7 @@ function fnReturn(){
dialog.close("searchAddrDialog"); dialog.close("searchAddrDialog");
} }
fnMakeResizableTable($("#table-responsive")[0]); Componentization.fnMakeResizableTable($("#table-responsive")[0]);
$("#list").hide(); $("#list").hide();
</script> </script>

@ -1,3 +1,7 @@
if(window.help !== undefined){
help.prototype.list.push("AddsFormFields 클래스 : FormFields클래스를 상속받은 ADDS프로젝트 내에서 사용하는 FormFields클래스");
}
/************************************************************************** /**************************************************************************
* AddsFormFields * AddsFormFields
**************************************************************************/ **************************************************************************/

@ -1,33 +0,0 @@
/**************************************************************************
* 서버의 파일 정보로 javascript File 객체 생성
**************************************************************************/
async function fnCreateFileFromFileInfo(fileInfo){
if(/^[a-zA-Z][\:]/.test(fileInfo.URL)){
fileInfo.URL = fileInfo.URL.substring(2);
}
let response = null;
try {
response = await fetch(fileInfo.URL);
} catch(error){
let data = new Blob();
let metadata = {
type: fileInfo.MIME_TYPE
};
let file = new File([data], fileInfo.FILE_NM, metadata);
file.id = fileInfo.FILE_ID;
file.url = fileInfo.URL;
return new Promise(resolve => { resolve(file); });
}
let data = await response.blob();
let metadata = {
type: fileInfo.MIME_TYPE
};
let file = new File([data], fileInfo.FILE_NM, metadata);
file.id = fileInfo.FILE_ID;
file.url = fileInfo.URL;
return new Promise(resolve => { resolve(file); });
}

@ -1,7 +1,13 @@
/************************************************************************** if(window.help !== undefined){
help.prototype.list.push("AddsComponentization 클래스 : 특정 HTML요소에 기능을 추가할 수 있다.");
}
class AddsComponentization {
/**************************************************************************
* 그리드 내부 이미지 첨부 * 그리드 내부 이미지 첨부
**************************************************************************/ **************************************************************************/
function fnMakeGridImageViewer(tdEl, fileInputElName, fileInfo) { static fnMakeGridImageViewer(tdEl, fileInputElName, fileInfo) {
let fileInputEl = document.createElement("input"); let fileInputEl = document.createElement("input");
fileInputEl.name = fileInputElName; fileInputEl.name = fileInputElName;
@ -59,4 +65,5 @@ function fnMakeGridImageViewer(tdEl, fileInputElName, fileInfo) {
}); });
$(fileInputEl).trigger("change"); $(fileInputEl).trigger("change");
}
} }

@ -0,0 +1,40 @@
if(window.help !== undefined){
help.prototype.list.push("AddsSupport 클래스 : ADDS프로젝트 내에서 공통적으로 사용할 수 있는 기능 지원");
}
class AddsSupport {
/**************************************************************************
* 서버의 파일 정보로 javascript File 객체 생성
**************************************************************************/
static async fnCreateFileFromFileInfo(fileInfo){
if(/^[a-zA-Z][\:]/.test(fileInfo.URL)){
fileInfo.URL = fileInfo.URL.substring(2);
}
let response = null;
try {
response = await fetch(fileInfo.URL);
} catch(error){
let data = new Blob();
let metadata = {
type: fileInfo.MIME_TYPE
};
let file = new File([data], fileInfo.FILE_NM, metadata);
file.id = fileInfo.FILE_ID;
file.url = fileInfo.URL;
return new Promise(resolve => { resolve(file); });
}
let data = await response.blob();
let metadata = {
type: fileInfo.MIME_TYPE
};
let file = new File([data], fileInfo.FILE_NM, metadata);
file.id = fileInfo.FILE_ID;
file.url = fileInfo.URL;
return new Promise(resolve => { resolve(file); });
}
}
Loading…
Cancel
Save