fix: 폐기 접수 처리

dev
Jonguk. Lim 5 months ago
parent 8e3d020b6a
commit a1c5603a54

@ -92,12 +92,19 @@
**************************************************************************/ **************************************************************************/
$P.control = new DatasetControl({ $P.control = new DatasetControl({
urls : { urls : {
load : wctx.url("/adds/nims/bssh-list.do") //load : wctx.url("/adds/nims/bssh-list.do")
load : '<c:url value="${apiHost}/api/biz/nims/v1/getNimsBsshInfoSt" />',
} }
, prefix: "bsshMain" , prefix: "bsshMain"
, prefixName: "마약류 취급업체 조회" , prefixName: "마약류 취급업체 조회"
, keymapper: info => info ? info.bsshCd : "" , keymapper: info => info ? info.bsshCd : ""
, dataGetter : obj => obj.bsshMainList , dataGetter : obj => obj => {
if (!obj.success){
dialog.alert(obj.message);
return false;
}
return obj.data;
}
, appendData: true , appendData: true
, infoSize: "xl" , infoSize: "xl"
}); });

@ -175,29 +175,38 @@
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
$P.control = new DatasetControl({ $P.control = new DatasetControl({
prefix: "dsuseMgtReceiptBssh" prefix: "dsuseMgtReceiptBssh"
, prefixName: "마약류 취급업체 조회" , prefixName: "마약류 취급업체 조회"
, keymapper: info => info ? info.bsshCd : "" , keymapper: info => info ? info.bsshCd : ""
, dataGetter: obj => obj.${infoPrefix}Info , dataGetter: obj => obj.${infoPrefix}Info
, infoSize: "xl" , infoSize: "xl"
}); });
$P.productControl = new DatasetControl({ $P.bsshList = new Dataset({
prefix: "dsuseMgtReceiptProduct" prefix: "dsuseMgtReceiptBsshList"
, prefixName: "마약류 제품 조회" , prefixName: "마약류 취급업체 조회"
, keymapper: info => info ? info.prductCd : "" , keymapper: info => info ? info.bsshCd : ""
, dataGetter: obj => obj.${infoPrefix}Info , dataGetter: obj => obj
, infoSize: "xl" , infoSize: "xl"
}); });
$P.productControl = new DatasetControl({
prefix: "dsuseMgtReceiptProduct"
, prefixName: "마약류 제품 조회"
, keymapper: info => info ? info.prductCd : ""
, dataGetter: obj => obj.${infoPrefix}Info
, infoSize: "xl"
});
$P.productList = new Dataset({
prefix: "dsuseMgtReceiptProductList"
, prefixName: "마약류 제품 조회"
, keymapper: info => info ? info.prductCd : ""
, dataGetter: obj => obj
, infoSize: "xl"
});
$P.productList = new Dataset({
prefix: "dsuseMgtReceiptProductList"
, prefixName: "마약류 제품 조회"
, keymapper: info => info ? info.prductCd : ""
, dataGetter: obj => obj
, infoSize: "xl"
});
/************************************************************************** /**************************************************************************
* DatasetControl 이벤트 * DatasetControl 이벤트
**************************************************************************/ **************************************************************************/

@ -100,7 +100,6 @@
$P.control = new DatasetControl({ $P.control = new DatasetControl({
urls : { urls : {
//load : wctx.url("/adds/nims/product-list.do") //load : wctx.url("/adds/nims/product-list.do")
//load : '<c:url value="${apiHost}/api/biz/nims/v1/getNimsProductInfoKd" />',
load : '<c:url value="${apiHost}/api/biz/nims/v1/getNimsProductInfoKdAndMnfSeqInfo" />', load : '<c:url value="${apiHost}/api/biz/nims/v1/getNimsProductInfoKdAndMnfSeqInfo" />',
} }
, prefix: "productMain" , prefix: "productMain"
@ -136,22 +135,6 @@
, appendData: true , appendData: true
, infoSize: "xl" , infoSize: "xl"
}); });
/*
json.post({
url:'http://localhost:9076/api/biz/nims/v1/getNimsProductInfoKd',
data: { "k": "",
"fg": "1",
"pg": "1",
"ymd": "",
"fg2": "",
"p": "8806489012426",
"pn": "",
"dbSkipYn": "N",
"userId": "suji"
// "userId": "${currentUser.account}"
},
success: resp => $P.control.setData(resp)
});*/
// $P.control 설정 // $P.control 설정
$P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30 $P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
@ -241,20 +224,26 @@
**************************************************************************/ **************************************************************************/
$P.fnSearchList = () => { $P.fnSearchList = () => {
$P.control.query = { "k": "", <%-- $P.control.query = {--%>
"fg": "1", <%-- "p": $P.formFields.get().schProductCd,--%>
"pg": "1", <%--// "p": '8806416009017',--%>
"ymd": "", <%-- "pn": $P.formFields.get().schProductNm,--%>
"fg2": "", <%-- "dbSkipYn": "N",--%>
"p": $P.formFields.get().schProductCd, <%-- "userId": "${currentUser.account}"--%>
// "p": '8806416009017', <%-- };--%>
"pn": $P.formFields.get().schProductNm, // 검색조건
"dbSkipYn": "N", // FIXME: 제품코드 또는 제품명중 하나는 필수
"userId": "suji"
// "userId": "${currentUser.account}"
};
// 검색조건
// $P.control.query = $P.formFields.get(); // 검색 조건 // $P.control.query = $P.formFields.get(); // 검색 조건
$P.control.query = {
... $P.formFields.get(),
p: $P.formFields.get().schProductCd,
pn: $P.formFields.get().schProductNm,
dbSkipYn: "N",
// FIXME: userId 는 현재 로그인한 사용자의 ID로 변경 - 공통 처리후
userId: "${currentUser.id}"
//userId: "suji"
};
debugger;
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수 $P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수
$P.control.query.delYn = "N"; // 삭제 여부 $P.control.query.delYn = "N"; // 삭제 여부
@ -267,7 +256,8 @@
dialog.alert({ dialog.alert({
content: "현재 " + $P.control.prefixName + " 정보를 선택 하시겠습니까?" content: "현재 " + $P.control.prefixName + " 정보를 선택 하시겠습니까?"
, init: () => { setDialogZindex(); } , init: () => { setDialogZindex(); }
, onOK: () => { var openPage = new FimsFormFields("#${openPage}"); , onOK: () => {
let openPage = new FimsFormFields("#${openPage}");
openPage.set (null,$P.control.getCurrent()); // formFields openPage.set (null,$P.control.getCurrent()); // formFields
dialog.close("productMainDialog"); dialog.close("productMainDialog");
} }

Loading…
Cancel
Save