diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/bssh-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/bssh-main.jsp
index ec1c3c1..38041ac 100644
--- a/src/main/webapp/WEB-INF/jsp/adds/nims/bssh-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/adds/nims/bssh-main.jsp
@@ -92,12 +92,19 @@
**************************************************************************/
$P.control = new DatasetControl({
urls : {
- load : wctx.url("/adds/nims/bssh-list.do")
+ //load : wctx.url("/adds/nims/bssh-list.do")
+ load : '',
}
, prefix: "bsshMain"
, prefixName: "마약류 취급업체 조회"
, 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
, infoSize: "xl"
});
diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp
index 6a2c38d..7a57364 100644
--- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp
+++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-info.jsp
@@ -175,29 +175,38 @@
/**************************************************************************
* DatasetControl
**************************************************************************/
- $P.control = new DatasetControl({
- prefix: "dsuseMgtReceiptBssh"
- , prefixName: "마약류 취급업체 조회"
- , keymapper: info => info ? info.bsshCd : ""
- , dataGetter: obj => obj.${infoPrefix}Info
- , infoSize: "xl"
- });
+ $P.control = new DatasetControl({
+ prefix: "dsuseMgtReceiptBssh"
+ , prefixName: "마약류 취급업체 조회"
+ , keymapper: info => info ? info.bsshCd : ""
+ , dataGetter: obj => obj.${infoPrefix}Info
+ , infoSize: "xl"
+ });
+
+ $P.bsshList = new Dataset({
+ prefix: "dsuseMgtReceiptBsshList"
+ , prefixName: "마약류 취급업체 조회"
+ , keymapper: info => info ? info.bsshCd : ""
+ , dataGetter: obj => obj
+ , 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.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"
- });
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/product-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/product-main.jsp
index d92ba9e..59a58df 100644
--- a/src/main/webapp/WEB-INF/jsp/adds/nims/product-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/adds/nims/product-main.jsp
@@ -100,7 +100,6 @@
$P.control = new DatasetControl({
urls : {
//load : wctx.url("/adds/nims/product-list.do")
- //load : '',
load : '',
}
, prefix: "productMain"
@@ -136,22 +135,6 @@
, appendData: true
, 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.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
@@ -241,20 +224,26 @@
**************************************************************************/
$P.fnSearchList = () => {
- $P.control.query = { "k": "",
- "fg": "1",
- "pg": "1",
- "ymd": "",
- "fg2": "",
- "p": $P.formFields.get().schProductCd,
-// "p": '8806416009017',
- "pn": $P.formFields.get().schProductNm,
- "dbSkipYn": "N",
- "userId": "suji"
-// "userId": "${currentUser.account}"
- };
- // 검색조건
+<%-- $P.control.query = {--%>
+<%-- "p": $P.formFields.get().schProductCd,--%>
+<%--// "p": '8806416009017',--%>
+<%-- "pn": $P.formFields.get().schProductNm,--%>
+<%-- "dbSkipYn": "N",--%>
+<%-- "userId": "${currentUser.account}"--%>
+<%-- };--%>
+ // 검색조건
+ // FIXME: 제품코드 또는 제품명중 하나는 필수
// $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.delYn = "N"; // 삭제 여부
@@ -267,7 +256,8 @@
dialog.alert({
content: "현재 " + $P.control.prefixName + " 정보를 선택 하시겠습니까?"
, init: () => { setDialogZindex(); }
- , onOK: () => { var openPage = new FimsFormFields("#${openPage}");
+ , onOK: () => {
+ let openPage = new FimsFormFields("#${openPage}");
openPage.set (null,$P.control.getCurrent()); // formFields
dialog.close("productMainDialog");
}