feat : 상세조회 화면 추가 (호출기능 수정 필요)

dev
Leeyh1121 5 months ago
parent dd72ddff41
commit d64a16c6f2

@ -0,0 +1,496 @@
package cokr.xit.adds.nims;
import cokr.xit.foundation.component.QueryRequest;
/**
*
* <p> :
*
* <pre>
* ============ ============
* 2023-06-23 leebj
* ================================
* </pre>
*/
public class DsuseMgtQuery extends QueryRequest{
private static final long serialVersionUID = 1L;
//검색조건
private String schDscdmngId; // 검색 폐기관리 id
//폐기관리
private String dscdmngId; // 폐기관리 ID
private String deptCd; // 부서 코드
private String userId; // 사용자 ID
private String prgrsSttsCd; // 진행 상태 코드
private String bsshCd; // 마약류 취급자 식별 번호
private String rndDtlRptCnt; // 수불 상세 보고 수
private String hdrDe; // 취급 일자
private String dsuseSeCd; // 폐기 구분 코드
private String dsusePrvCd; // 폐기 사유 코드
private String dsuseMthCd; // 폐기 방법 코드
private String dsuseLoc; // 폐기 장소
private String dsuseDe; // 폐기 일자
private String stts; // 처리 상태
private String usrRptIdNo; // 사용자 보고 식별 번호
private String orgUsrRptIdNo; // 원 사용자 보고 식별 번호
private String rptTyCd; // 보고 유형 코드
private String useYn; // 사용 여부
private String regDt; // 등록 일시
private String rgtr; // 등록자
private String mdfcnDt; // 수정 일시
private String mdfr; // 수정자
//저장소 정보
private String bsshNm; // 업체명
private String indutyNm; // 업종명
private String hdntCd; // 의료업자 구분
private String hdntNm; // 의료업자 구분명
private String bizrno; // 사업자등록번호
private String rprsntvNm; // 대표자 명
private String chrgNm; // 담당자 명
private String hptlNo; // 요양기관 기호
private String joinYn; // 획원가입 여부
private String bsshSttsNm; // 상태
private String prmisnNo; // 허가 번호
private String dscdmngSn; // 폐기관리 순번
private String prductCd; // 제품 코드
private String prductNm; // 제품 명
private String minDistbQy; // 최소 유통단위 수량
private String minDistbUnit; // 최소 유통 단위
private String minDistb; // 최소 유통 단위 및 수량
private String pceQy; // 낱개단위 수량
private String pceUnit; // 낱개 단위
private String pce; // 낱개 단위 및 수량
private String mnfNo; // 제조 번호
private String prdValidDe; // 제조 유효기한 일자
private String mnfSeq; // 제조 일련번호
private String dsuseQy; // 폐기 수량
private String usrRptInIdNo; // 사용자 보고 라인 식별 번호
public String getSchDscdmngId() {
return ifEmpty(schDscdmngId, () -> null);
}
public <T extends DsuseMgtQuery> T setSchDscdmngId(String schDscdmngId) {
this.schDscdmngId = schDscdmngId;
return self();
}
public String getDscdmngId() {
return ifEmpty(dscdmngId, () -> null);
}
public <T extends DsuseMgtQuery> T setDscdmngId(String dscdmngId) {
this.dscdmngId = dscdmngId;
return self();
}
public String getDeptCd() {
return ifEmpty(deptCd, () -> null);
}
public <T extends DsuseMgtQuery> T setDeptCd(String deptCd) {
this.deptCd = deptCd;
return self();
}
public String getUserId() {
return ifEmpty(userId, () -> null);
}
public <T extends DsuseMgtQuery> T setUserId(String userId) {
this.userId = userId;
return self();
}
public String getPrgrsSttsCd() {
return ifEmpty(prgrsSttsCd, () -> null);
}
public <T extends DsuseMgtQuery> T setPrgrsSttsCd(String prgrsSttsCd) {
this.prgrsSttsCd = prgrsSttsCd;
return self();
}
public String getBsshCd() {
return ifEmpty(bsshCd, () -> null);
}
public <T extends DsuseMgtQuery> T setBsshCd(String bsshCd) {
this.bsshCd = bsshCd;
return self();
}
public String getRndDtlRptCnt() {
return ifEmpty(rndDtlRptCnt, () -> null);
}
public <T extends DsuseMgtQuery> T setRndDtlRptCnt(String rndDtlRptCnt) {
this.rndDtlRptCnt = rndDtlRptCnt;
return self();
}
public String getHdrDe() {
return ifEmpty(hdrDe, () -> null);
}
public <T extends DsuseMgtQuery> T setHdrDe(String hdrDe) {
this.hdrDe = hdrDe;
return self();
}
public String getDsuseSeCd() {
return ifEmpty(dsuseSeCd, () -> null);
}
public <T extends DsuseMgtQuery> T setDsuseSeCd(String dsuseSeCd) {
this.dsuseSeCd = dsuseSeCd;
return self();
}
public String getDsusePrvCd() {
return ifEmpty(dsusePrvCd, () -> null);
}
public <T extends DsuseMgtQuery> T setDsusePrvCd(String dsusePrvCd) {
this.dsusePrvCd = dsusePrvCd;
return self();
}
public String getDsuseMthCd() {
return ifEmpty(dsuseMthCd, () -> null);
}
public <T extends DsuseMgtQuery> T setDsuseMthCd(String dsuseMthCd) {
this.dsuseMthCd = dsuseMthCd;
return self();
}
public String getDsuseLoc() {
return ifEmpty(dsuseLoc, () -> null);
}
public <T extends DsuseMgtQuery> T setDsuseLoc(String dsuseLoc) {
this.dsuseLoc = dsuseLoc;
return self();
}
public String getDsuseDe() {
return ifEmpty(dsuseDe, () -> null);
}
public <T extends DsuseMgtQuery> T setDsuseDe(String dsuseDe) {
this.dsuseDe = dsuseDe;
return self();
}
public String getStts() {
return ifEmpty(stts, () -> null);
}
public <T extends DsuseMgtQuery> T setStts(String stts) {
this.stts = stts;
return self();
}
public String getUsrRptIdNo() {
return ifEmpty(usrRptIdNo, () -> null);
}
public <T extends DsuseMgtQuery> T setUsrRptIdNo(String usrRptIdNo) {
this.usrRptIdNo = usrRptIdNo;
return self();
}
public String getOrgUsrRptIdNo() {
return ifEmpty(orgUsrRptIdNo, () -> null);
}
public <T extends DsuseMgtQuery> T setOrgUsrRptIdNo(String orgUsrRptIdNo) {
this.orgUsrRptIdNo = orgUsrRptIdNo;
return self();
}
public String getRptTyCd() {
return ifEmpty(rptTyCd, () -> null);
}
public <T extends DsuseMgtQuery> T setRptTyCd(String rptTyCd) {
this.rptTyCd = rptTyCd;
return self();
}
public String getUseYn() {
return ifEmpty(useYn, () -> null);
}
public <T extends DsuseMgtQuery> T setUseYn(String useYn) {
this.useYn = useYn;
return self();
}
public String getRegDt() {
return ifEmpty(regDt, () -> null);
}
public <T extends DsuseMgtQuery> T setRegDt(String regDt) {
this.regDt = regDt;
return self();
}
public String getRgtr() {
return ifEmpty(rgtr, () -> null);
}
public <T extends DsuseMgtQuery> T setRgtr(String rgtr) {
this.rgtr = rgtr;
return self();
}
public String getMdfcnDt() {
return ifEmpty(mdfcnDt, () -> null);
}
public <T extends DsuseMgtQuery> T setMdfcnDt(String mdfcnDt) {
this.mdfcnDt = mdfcnDt;
return self();
}
public String getMdfr() {
return ifEmpty(mdfr, () -> null);
}
public <T extends DsuseMgtQuery> T setMdfr(String mdfr) {
this.mdfr = mdfr;
return self();
}
public String getBsshNm() {
return ifEmpty(bsshNm, () -> null);
}
public <T extends DsuseMgtQuery> T setBsshNm(String bsshNm) {
this.bsshNm = bsshNm;
return self();
}
public String getIndutyNm() {
return ifEmpty(indutyNm, () -> null);
}
public <T extends DsuseMgtQuery> T setIndutyNm(String indutyNm) {
this.indutyNm = indutyNm;
return self();
}
public String getHdntCd() {
return ifEmpty(hdntCd, () -> null);
}
public <T extends DsuseMgtQuery> T setHdntCd(String hdntCd) {
this.hdntCd = hdntCd;
return self();
}
public String getHdntNm() {
return ifEmpty(hdntNm, () -> null);
}
public <T extends DsuseMgtQuery> T setHdntNm(String hdntNm) {
this.hdntNm = hdntNm;
return self();
}
public String getBizrno() {
return ifEmpty(bizrno, () -> null);
}
public <T extends DsuseMgtQuery> T setBizrno(String bizrno) {
this.bizrno = bizrno;
return self();
}
public String getRprsntvNm() {
return ifEmpty(rprsntvNm, () -> null);
}
public <T extends DsuseMgtQuery> T setRprsntvNm(String rprsntvNm) {
this.rprsntvNm = rprsntvNm;
return self();
}
public String getChrgNm() {
return ifEmpty(chrgNm, () -> null);
}
public <T extends DsuseMgtQuery> T setChrgNm(String chrgNm) {
this.chrgNm = chrgNm;
return self();
}
public String getHptlNo() {
return ifEmpty(hptlNo, () -> null);
}
public <T extends DsuseMgtQuery> T setHptlNo(String hptlNo) {
this.hptlNo = hptlNo;
return self();
}
public String getJoinYn() {
return ifEmpty(joinYn, () -> null);
}
public <T extends DsuseMgtQuery> T setJoinYn(String joinYn) {
this.joinYn = joinYn;
return self();
}
public String getBsshSttsNm() {
return ifEmpty(bsshSttsNm, () -> null);
}
public <T extends DsuseMgtQuery> T setBsshSttsNm(String bsshSttsNm) {
this.bsshSttsNm = bsshSttsNm;
return self();
}
public String getPrmisnNo() {
return ifEmpty(prmisnNo, () -> null);
}
public <T extends DsuseMgtQuery> T setPrmisnNo(String prmisnNo) {
this.prmisnNo = prmisnNo;
return self();
}
public String getDscdmngSn() {
return ifEmpty(dscdmngSn, () -> null);
}
public <T extends DsuseMgtQuery> T setDscdmngSn(String dscdmngSn) {
this.dscdmngSn = dscdmngSn;
return self();
}
public String getPrductCd() {
return ifEmpty(prductCd, () -> null);
}
public <T extends DsuseMgtQuery> T setPrductCd(String prductCd) {
this.prductCd = prductCd;
return self();
}
public String getPrductNm() {
return ifEmpty(prductNm, () -> null);
}
public <T extends DsuseMgtQuery> T setPrductNm(String prductNm) {
this.prductNm = prductNm;
return self();
}
public String getMinDistbQy() {
return ifEmpty(minDistbQy, () -> null);
}
public <T extends DsuseMgtQuery> T setMinDistbQy(String minDistbQy) {
this.minDistbQy = minDistbQy;
return self();
}
public String getMinDistbUnit() {
return ifEmpty(minDistbUnit, () -> null);
}
public <T extends DsuseMgtQuery> T setMinDistbUnit(String minDistbUnit) {
this.minDistbUnit = minDistbUnit;
return self();
}
public String getMindistb() {
return ifEmpty(minDistb, () -> null);
}
public <T extends DsuseMgtQuery> T setMindistb(String minDistb) {
this.minDistb = minDistb;
return self();
}
public String getPceqy() {
return ifEmpty(pceQy, () -> null);
}
public <T extends DsuseMgtQuery> T setPceqy(String pceQy) {
this.pceQy = pceQy;
return self();
}
public String getPceunit() {
return ifEmpty(pceUnit, () -> null);
}
public <T extends DsuseMgtQuery> T setPceunit(String pceUnit) {
this.pceUnit = pceUnit;
return self();
}
public String getPce() {
return ifEmpty(pce, () -> null);
}
public <T extends DsuseMgtQuery> T setPce(String pce) {
this.pce = pce;
return self();
}
public String getMnfno() {
return ifEmpty(mnfNo, () -> null);
}
public <T extends DsuseMgtQuery> T setMnfno(String mnfNo) {
this.mnfNo = mnfNo;
return self();
}
public String getPrdvalidde() {
return ifEmpty(prdValidDe, () -> null);
}
public <T extends DsuseMgtQuery> T setPrdvalidde(String prdValidDe) {
this.prdValidDe = prdValidDe;
return self();
}
public String getMnfseq() {
return ifEmpty(mnfSeq, () -> null);
}
public <T extends DsuseMgtQuery> T setMnfseq(String mnfSeq) {
this.mnfSeq = mnfSeq;
return self();
}
public String getDsuseqy() {
return ifEmpty(dsuseQy, () -> null);
}
public <T extends DsuseMgtQuery> T setDsuseqy(String dsuseQy) {
this.dsuseQy = dsuseQy;
return self();
}
public String getUsrrptinidno() {
return ifEmpty(usrRptInIdNo, () -> null);
}
public <T extends DsuseMgtQuery> T setUsrrptinidno(String usrRptInIdNo) {
this.usrRptInIdNo = usrRptInIdNo;
return self();
}
}

@ -0,0 +1,32 @@
package cokr.xit.adds.nims.dao;
import java.util.List;
import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.adds.nims.DsuseMgtQuery;
import cokr.xit.adds.nims.DsuseMgtReceiptQuery;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
/** DAO
*
* <p> :
*
* <pre>
* ============ ============
* 2023-12-04 JoJH
* ================================
* </pre>
*/
@Mapper("dsuseMgtMapper")
public interface DsuseMgtMapper extends AbstractMapper {
/** .<br />
* @param req
* @return
*/
List<DataObject> selectDsuseMgtList(DsuseMgtQuery req);
}

@ -0,0 +1,22 @@
package cokr.xit.adds.nims.service;
import java.util.List;
import java.util.Map;
import cokr.xit.adds.nims.DsuseMgtQuery;
import cokr.xit.adds.nims.DsuseMgtReceiptQuery;
import cokr.xit.base.file.FileInfo;
import cokr.xit.foundation.data.DataObject;
public interface DsuseMgtService {
/** .
* @param query
* <ul><li>pageNum: </li>
* <li>fetchSize: </li>
* </ul>
* @return
*/
List<DataObject> getDsuseMgtList(DsuseMgtQuery query);
}

@ -0,0 +1,30 @@
package cokr.xit.adds.nims.service.bean;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import cokr.xit.adds.nims.DsuseMgtQuery;
import cokr.xit.adds.nims.dao.DsuseMgtMapper;
import cokr.xit.adds.nims.service.DsuseMgtService;
import cokr.xit.foundation.component.AbstractServiceBean;
import cokr.xit.foundation.data.DataObject;
@Service("dsuseMgtService")
public class DsuseMgtServiceBean extends AbstractServiceBean implements DsuseMgtService {
/** 전자우편 안내문 정보 DAO */
@Resource(name = "dsuseMgtMapper")
private DsuseMgtMapper dsuseMgtMapper;
@Override
public List<DataObject> getDsuseMgtList(DsuseMgtQuery query){
return dsuseMgtMapper.selectDsuseMgtList(query);
}
}

@ -0,0 +1,80 @@
package cokr.xit.adds.nims.web;
import java.util.Collection;
import java.util.function.Consumer;
import java.net.http.HttpResponse;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import javax.json.JsonObject;
import org.springframework.boot.configurationprocessor.json.JSONException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import net.minidev.json.JSONArray;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.JSONParser;
import net.minidev.json.parser.ParseException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import cokr.xit.adds.nims.service.DsuseMgtReceiptService;
import cokr.xit.adds.nims.service.DsuseMgtService;
import cokr.xit.adds.nims.BsshQuery;
import cokr.xit.adds.nims.DsuseMgtQuery;
import cokr.xit.foundation.web.AbstractController;
import cokr.xit.foundation.web.WebClient;
import cokr.xit.foundation.web.WebClient.Request.ContentType;
import cokr.xit.foundation.web.WebClient.Request;
import cokr.xit.foundation.data.DataObject;
@Controller
@RequestMapping(
name = "마약류폐기 신청 상세",
value = {"/adds/nims"}
)
public class DsuseMgtController extends AbstractController {
public static final String CLASS_URL = "/adds/nims";
public class METHOD_URL {
public static final String
dsuseMgthMain = "/dsuseMgt-main.do" // 부과 제외 관리 메인 화면
, getDsuseMgtList = "/dsuseMgt-list.do" // 부과 제외 대장 목록 조회
// , getLevyExclusionInfo = "/020/info.do" // 부과 제외 대장 조회
// , createLevyExclusion = "/020/create.do" // 부과 제외 대장 등록
;
}
@Resource(name="dsuseMgtService")
private DsuseMgtService dsuseMgtService;
@RequestMapping(name="마약류폐기 신청서 접수 메인", value=METHOD_URL.dsuseMgthMain)
public ModelAndView dsuseMgtMain(String dscdmng_id) {
ModelAndView mav = new ModelAndView("adds/nims/dsuseMgt-main");
// 사용자 정보
//ManagedUser managedUser = (ManagedUser)currentUser().getUser();
return mav
.addObject("pageName", "dsuseMgthMain") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefix", "dsuseMgt") // prefix
.addObject("infoPrefixUrl", "/adds/nims") // prefixUrl
.addObject("dscdmng_id", dscdmng_id)
;
}
@RequestMapping(name="마약류폐기 신청서 접수 조회", value=METHOD_URL.getDsuseMgtList)
public ModelAndView getDsuseMgtList(DsuseMgtQuery query) throws JsonProcessingException, ParseException {
setFetchSize(query);
return setCollectionInfo(new ModelAndView("jsonView"), dsuseMgtService.getDsuseMgtList(query),"","");
}
}

@ -0,0 +1,324 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="prefixName" scope="request">폐기관리 등록</c:set>
<!-- inner page html -->
<div class="content-wrapper">
<!-- Content -->
<div class="container flex-grow-1 px-0">
<!-- Page Body -->
<div class="card">
<!-- 입력 영역 -->
<form id="frmEdit--${pageName}" name="frmEdit">
<!-- hidden -->
<label for="bssh--${pageName}">취급자 정보</label>
<div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-4">
<label for="bsshNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">업체명</label>
<input type="text" class="form-control w-60" id="bsshNm--${pageName}" name="bsshNm" data-map="BSSH_NM" readonly>
</div>
<div class="col-md-4">
<label for="bsshCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">식별번호</label>
<input type="text" class="form-control w-60" id="bsshNm--${pageName}" name="bsshCd" data-map="BSSH_CD" readonly>
</div>
<button type="button" class="btn btn-search w-px-120" id="btnBsshSearch--${pageName}" title="검색">검색</button>
<div class="col-md-4">
<label for="rprsntvNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">대표자명</label>
<input type="text" class="form-control w-60" id="storgeNo--${pageName}" name="storgeNo" data-map="STORGE_NO" readonly>
</div>
<div class="col-md-4">
<label for="prmisnNo--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">허가번호</label>
<input type="text" class="form-control w-60" id="storgeNm--${pageName}" name="storgeNm" data-map="STORGE_NM" readonly>
</div>
<div class="col-md-4">
<label for="bizrNo--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">사업자등록번호</label>
<input type="text" class="form-control w-60" id="bsshAdres--${pageName}" name="bsshAdres" data-map="BSSH_ADRES" readonly>
</div>
<div class="col-md-8">
<label for="addr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기사유</label>
<select class="form-select" id="schVltnCd--${pageName}" name="schVltnCd"><option value="">사고마약류(파손)</option><option value="01">사고마약류(변질,부패)</option><option value="02">유효기한 또는 사용기한 경과</option><option value="03">재고관리 또는 보관을 하기에 곤란한 사유(유효기한 임박)</option>
<option value="04">재고관리 또는 보관을 하기에 곤란한 사유(사용중단)</option>
<option value="05">재고관리 또는 보관을 하기에 곤란한 사유(폐업)</option>
<option value="06">재고관리 또는 보관을 하기에 곤란한 사유(환자반납)</option>
<option value="07">기타(사고마약류(도난,분실,재해) 발생보고 완료건)</option>
<option value="08">기타(제조공정 중 폐기물)</option></select>
</div>
</div>
<div class="row my-1 mx-1 g-1 border-card rounded"></div>
<label for="bssh--${pageName}">폐기 공통 정보</label>
<div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-12">
<label for="hdrDe--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">취급일자</label>
<input type="text" id="hdrDe--${pageName}" name="hdrDe" data-map="HDR_DE" class="form-control w-px-200" readonly="" data-maxlengthb="200">
</div>
<div class="col-md-4">
<label for="dsuseDe--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기일자</label>
<input type="text" id="dsuseDe--${pageName}" name="dsuseDe" data-map="DSUSE_DE" class="form-control w-px-200" readonly="" data-maxlengthb="200">
</div>
<div class="col-md-4">
<label for="dsuseSe--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기구분</label>
<input type="text" class="form-control w-60" id="dsuseSe--${pageName}" name="dsuseSe" data-map="DSUSE_SE" readonly>
</div>
<div class="col-md-4">
<label for="dsuseMth--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기방법</label>
<input type="text" class="form-control w-60" id="dsuseMth--${pageName}" name="dsuseMth" data-map="DSUSE_MTH" readonly>
</div>
<div class="col-md-4">
<label for="dsuseLoc--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기장소</label>
<input type="text" class="form-control w-60" id="dsuseLoc--${pageName}" name="dsuseLoc" data-map="DSUSE_LOC" readonly>
</div>
<div class="col-md-4">
<label for="dsuseImg--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기이미지</label>
<input type="text" class="form-control w-60" id="dsuseImg--${pageName}" name="dsuseImg" data-map="DSUSE_IMG" readonly>
</div>
</div>
<div class="row my-1 mx-1 g-1 border-card rounded"></div>
<label for="rtpyrNm--${pageName}">폐기정보 상세</label>
<form id="code-form">
<div class="row my-1 mx-4 g-1 border-card rounded-3">
<div class="col-md-6">
<label for="rtpyrNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품명</label>
<input type="text" id="rtpyrNm--${pageName}" name="rtpyrNm" data-map="RTPYR_NM" class="form-control" readonly="">
<button type="button" class="btn btn-search w-px-120" id="btnSearch--excl02010" title="검색">바코드 검색</button>
</div>
<div class="col-md-6">
<label for="dtlAddr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품 코드</label>
<input type="text" id="dtlAddr--${pageName}" name="dtlAddr" data-map="DTL_ADDR" class="form-control w-px-300" readonly="" data-maxlengthb="200">
</div>
<div class="col-md-6">
<label for="dtlAddr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 번호</label>
<input type="text" id="dtlAddr--${pageName}" name="dtlAddr" data-map="DTL_ADDR" class="form-control w-px-300" readonly="" data-maxlengthb="200">
</div>
<div class="col-md-6">
<label for="dtlAddr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 일련 번호</label>
<input type="text" id="dtlAddr--${pageName}" name="dtlAddr" data-map="DTL_ADDR" class="form-control w-px-300" readonly="" data-maxlengthb="200">
</div>
<div class="col-md-12">
<label for="addr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">유효기간</label>
<input type="text" id="dtlAddr--${pageName}" name="dtlAddr" data-map="DTL_ADDR" class="form-control w-px-200" readonly="" data-maxlengthb="200">
</div>
<div class="col-md-4">
<label for="zip--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">최소 유통단위 슈량</label>
<input type="text" id="zip--${pageName}" name="zip" data-map="ZIP" class="form-control w-px-100" readonly="">
</div>
<div class="col-md-4">
<label for="addr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">낱개 단위 수량</label>
<input type="text" id="addr--${pageName}" name="addr" data-map="ADDR" class="form-control w-px-100" data-maxlengthb="320" readonly="">
</div>
<div class="col-md-4">
<label for="addr--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기 수량</label>
<input type="text" id="addr--${pageName}" name="addr" data-map="ADDR" class="form-control w-px-100" data-maxlengthb="320">
</div>
<div style=" align-content: center; text-align: center;">
<span>
<!-- 업무 버튼 -->
<button type="button" class="btn btn-primary w-px-80" id="btnSave--excl02040" title="저장">추가</button>
<button type="button" class="btn btn-primary w-px-80" id="btnSave--excl02040" title="저장">제거</button>
</span>
</div>
</div>
<table class="datatables-ajax table table-bordered dataTable no-footer" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
<thead>
<tr><th style="width: 15.828px;text-align:center;" tabindex="0">No</th>
<th class="sorting sorting_asc" aria-sort="ascending" style="width: 223.719px;">제품명</th>
<th class="sorting" style="width: 146.156px;">제품코드</th>
<th class="sorting" style="width: 160.141px;">제품번호</th>
<th class="sorting" style="width: 160.141px;">제조 일련 번호</th>
<th class="sorting" style="width: 230.469px;">유효기간</th>
<th class="sorting" style="width: 230.469px;">최소 유통단위 수량</th>
<th class="sorting" style="width: 230.469px;">낱개 단위 수량</th>
<th class="sorting" style="width: 230.469px;">폐기 수량</th>
</tr>
</thead>
<tbody id="userList">
</tbody>
<template id="prductRow">
<tr data-key="{PRDUCT_CD}">
<td style="text-align:center;"><input value="{PRDUCT_CD}" onchange="userControl.select('{PRDUCT_CD}', this.checked);" type="checkbox" class="form-check-input"></td>
<td {onclick}="" {ondblclick}="">{PRDUCT_CD}</td>
<td {onclick}="" {ondblclick}="">{PRDUCT_NM}</td>
<td {onclick}="" {ondblclick}="">{MNF_NO}</td>
<td {onclick}="" {ondblclick}="">{PRD_VALID_DE}</td>
<td {onclick}="" {ondblclick}="">{MIN_DISTB_QY}</td>
<td {onclick}="" {ondblclick}="">{PCE_QY}</td>
<td {onclick}="" {ondblclick}="">{DSUSE_QY}</td>
</tr>
</template>
</table>
</form>
</form> <!-- /입력 영역 -->
</div> <!-- <div class="card"> -->
<!-- 업무 버튼 표시 -->
<div>
<span class="container-page-btn">
<span class="container-window-btn-right">
<!-- 업무 버튼 -->
<button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="저장">저장</button>
</span>
</span>
</div>
<!-- / 업무 버튼 표시 -->
</div> <!-- / Content <div class="container flex-grow-1 px-0"> -->
</div> <!-- / inner page html <div class="content-wrapper"> -->
<script>
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {};
/**************************************************************************
* script 진입
**************************************************************************/
$(document).ready(function() {
// pageObject
let $P = pageObject["${pageName}"];
// FormFields
$P.formFields = new FimsFormFields("#frmEdit--${pageName}");
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.control = new DatasetControl({
prefix: "dsuseMgtReceiptAllInfo"
, prefixName: "마약류 폐기 상세정보"
, keymapper: info => info ? info.MNG_ID : ""
, dataGetter: obj => obj.${infoPrefix}Info
, infoSize: "xl"
});
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = item => {
if (!item) return;
// Dataset 셋팅
$P.formFields.set($P.control, item);
// 업무구분에 따른 URL 변경
$P.fnSetURL(item.data.TASK_SE_CD);
}
// 저장 callback
$P.control.onSave = (resp) => {
let dialogTitle = $("#" + $P.control.prefix + "Dialog--${openerPageName}").find("h5.modal-title").html();
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
// 메시지 출력
dialog.alert({
content: showMessage
, init: () => { setDialogZindex(); }
, onOK: () => { }
});
if (resp.saved) {
dialog.close($P.control.prefix + "Dialog--${openerPageName}");
}
}
$P.control.getBsshInfo = (gdccId) => {
let dialogTitle = "취급자 정보 조회";
let params = {};
ajax.get({
url : wctx.url("/adds/nims/bssh-main.do")
, data : params || {}
, success : resp => {
dialog.open({
id : "bsshMainDialog"
, title : dialogTitle
, content : resp
, size : $P.control.infoSize
, onClose : () => { $P.control.setData(); }
});
}
});
}
// 저장
$P.control.save = (info) => {
if (!info) return;
let create = (info.mngId == "");
ajax.post({
url: !create ? $P.control.urls.update : $P.control.urls.create
, data: info || {}
, success: resp => $P.control.onSave(resp)
});
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 업무구분에 따른 URL 설정
$P.fnSetURL = (taskSeCd) => {
$P.control.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/create.do"); // 등록
$P.control.urls.update = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/040/update.do"); // 수정
}
// 전자우편 안내문 등록 버튼 이벤트
$P.fnSearchBssh = (title) => {
$P.control.getBsshInfo();
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 저장
$P.fnSave = () => {
// validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
dialog.alert({
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
, init: () => { setDialogZindex(); }
, onOK: () => {
$P.control.save($P.formFields.get()); // formFields
}
});
}
/**************************************************************************
* 초기 셋팅
**************************************************************************/
// 이벤트 설정
$P.setEvent = () => {
// 안내문 등록 버튼 이벤트
$("#btnBsshSearch--${pageName}").on("click", function() {
$P.fnSearchBssh($(this).attr("title"));
});
// 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
}
// 초기 화면 설정
$P.initForm = () => {
// Dialog 마우스로 드래그 할 수 있도록 설정.
fnMakeDraggableDialog(document.getElementById($P.control.prefix + "Dialog"));
}
/**************************************************************************
* 최초 실행 함수
**************************************************************************/
// 1. 이벤트 설정
$P.setEvent();
// 2. 초기 화면 설정
$P.initForm();
// 3. Dataset 설정
$P.control.setData([${opnnDlbrMbrInfo}]);
});
</script>

@ -85,6 +85,13 @@
<input type="text" id="addr--${pageName}" name="addr" data-map="ADDR" class="form-control w-px-100" data-maxlengthb="320">
</div>
</div>
<div style=" align-content: center; text-align: center;">
<span>
<!-- 업무 버튼 -->
<button type="button" class="btn btn-primary w-px-80" id="btnSave--excl02040" title="저장">추가</button>
<button type="button" class="btn btn-primary w-px-80" id="btnSave--excl02040" title="저장">제거</button>
</span>
</div>
<table class="datatables-ajax table table-bordered dataTable no-footer" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
<thead>
<tr><th style="width: 15.828px;text-align:center;" tabindex="0">No</th>
@ -191,11 +198,11 @@
$P.control.getBsshInfo = (gdccId) => {
let dialogTitle = "취급자 정보 조회";
let params = {};
let params = {openPage : "frmEdit--${pageName}"};
ajax.get({
url : wctx.url("/adds/nims/bssh-main.do")
, data : {openPage : "frmEdit--${pageName}"}
, data : params
, success : resp => {
dialog.open({
id : "bsshMainDialog"

@ -297,11 +297,11 @@
$P.control.getBsshInfo = (gdccId) => {
let dialogTitle = "취급자 정보 조회";
let params = {};
let params = {openPage : "frmSearch--${pageName}"};
ajax.get({
url : wctx.url("/adds/nims/bssh-main.do")
, data : {openPage : "frmSearch--${pageName}"}
, data : params
, success : resp => {
dialog.open({
id : "bsshMainDialog"

Loading…
Cancel
Save