fit : 매핑 상세화면 신청정보 호출 기능 수정.

dev
Leeyh1121 5 months ago
parent b3bb822ea5
commit d7b99af9e1

@ -0,0 +1,78 @@
package cokr.xit.adds.cmm.model;
import com.fasterxml.jackson.annotation.JsonAlias;
import lombok.Data;
@Data
public class DsuseMappingInfo {
/**
*
*/
@JsonAlias("BSSH_CD")
private String bsshCd;
/**
*
*/
@JsonAlias(value = "BSSH_NM")
private String bsshNm;
/**
*
*/
@JsonAlias("INDUTY_NM")
private String indutyNm;
/**
*
*/
@JsonAlias("HDNT_CD")
private String hdntCd;
/**
*
*/
@JsonAlias("HDNT_NM")
private String hdntNm;
/**
*
*/
@JsonAlias("BIZRNO")
private String bizrno;
/**
*
*/
@JsonAlias("RPRSNTV_NM")
private String rprsntvNm;
/**
*
*/
@JsonAlias("CHRG_NM")
private String chrgNm;
/**
*
*/
@JsonAlias("HPTL_NO")
private String hptlNo;
/**
*
*/
@JsonAlias("PRMISN_NO")
private String prmisnNo;
private String dscdmngId;
private String usrRptIdNo;
private String dsusePrvNm;
private String rndDtlRptCnt;
private String hdrDe;
private String dsuseDe;
private String dsuseSeCd;
private String dsuseMthCd;
private String dsuseLoc;
}

@ -96,23 +96,21 @@
<th class="sorting" style="width: 146.156px;">제품코드</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>
<th class="sorting" style="width: 230.469px;">폐기 수량</th>
</tr>
</thead>
<tbody id="tbody--${pageName}Detail">
</tbody>
<template id="${infoPrefix}Row--${pageName}Detail">
<tr data-key="{USR_RPT_ID_NO}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<tr data-key="{DSCDMNG_SN}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}"></td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRDUCT_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRDUCT_CD}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_QY}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_QY} {PCE_UNIT}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{PRD_VALID_DE}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MIN_DISTB}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PCE}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_QY}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MIN_DISTB_QY} {MIN_DISTB_UNIT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PCE_QY} {PCE_UNIT}</td>
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}Detail">
@ -251,18 +249,35 @@
// FormFields
$P.formFields = new AddsFormFields("#frmEdit--${pageName}");
$P.productFormFields = new AddsFormFields("#product--${pageName}");
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.control = new DatasetControl({
prefix: "dsuseMgtMapping"
, prefixName: "마약류 취급업체 조회"
, keymapper: info => info ? info.dscdmngId : ""
, dataGetter: obj => obj.${infoPrefix}Info
, infoSize: "xl"
});
$P.control = new DatasetControl({
prefix: "dsuseMgtMapping"
, prefixName: "마약류 취급업체 조회"
, keymapper: info => info ? info.dscdmngId : ""
, dataGetter: obj => obj.${infoPrefix}Info
, infoSize: "xl"
});
$P.detailControl = new DatasetControl({
urls : {
load : wctx.url("/adds/nims/dsuseMgtDetail-list.do")
// FIXME: POST로 변경
//load : '<c:url value="${apiHost}/api/biz/nims/v1/getDsuseMgts" />'
}
// , query.schDscdmngId : $P.control.getValue("DSCDMNG_ID")
// , data : {"schDscdmngId" : $P.control.getValue("DSCDMNG_ID")}
, prefix : "dsuseMgtDetail"
, prefixName : "신청서접수상세"
, keymapper : info => info ? info.DSCDMNG_SN : ""
, dataGetter : obj => obj.dsuseMgtDetailList
, formats : {
PRD_VALID_DE: dateFormat
}
});
/**************************************************************************
* DatasetControl 이벤트
@ -273,13 +288,33 @@
};
$P.detailControl.onDatasetChange = (obj) => {
$P.renderDetailList(obj.${infoPrefix}Total);
};
// 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = item => {
if (!item) return;
$P.formFields.set($P.control, item);
// 업무구분에 따른 URL 변경
//$P.fnSetURL(item.data.bsshCd);
let key = item.data.dscdmngId;
$("#tbody--${pageName}").setCurrentRow(key);
var dscdmngId = item.data.dscdmngId;
$P.detailControl.query = { "schDscdmngId" : dscdmngId};
$P.detailControl.load(1);
}
$P.detailControl.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.DSCDMNG_SN;
$("#tbody--${pageName}Detail").setCurrentRow(key);
};
// 저장 callback
$P.control.onSave = (resp) => {
@ -314,7 +349,20 @@
/**************************************************************************
* DataTables 이벤트
**************************************************************************/
$P.renderDetailList = () => {
let ${infoPrefix}List = $P.detailControl.dataset;
let empty = ${infoPrefix}List.empty;
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound--${pageName}Detail").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}Detail").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].detailControl.setCurrent('" + dataItem.getValue("DSCDMNG_SN") + "');")
);
$("#tbody--${pageName}Detail").html(trs.join());
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/

Loading…
Cancel
Save