fix: 파일, 메소드 명 변경 - 팝업은 popup 으로

유효성 체크 추가
dev
Jonguk. Lim 5 months ago
parent c7fd6ef330
commit 75d58ad8ff

@ -1,40 +1,54 @@
package cokr.xit.adds.nims.web; package cokr.xit.adds.nims.web;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.adds.nims.service.DsuseMgtReceiptService;
import cokr.xit.foundation.web.AbstractController; import cokr.xit.foundation.web.AbstractController;
import lombok.RequiredArgsConstructor;
//@RequiredArgsConstructor
@Controller @Controller
@RequestMapping( @RequestMapping(
name = "Nims 관리", name = "마약류 폐기 보고",
value = {"/adds/nims"} value = {"/adds/nims"}
) )
public class AddsNimsController extends AbstractController { public class AddsNimsController extends AbstractController {
/* @Value("${app.api.host:}") @Value("${app.api.host:}")
private String apiHost; private String apiHost;
@RequestMapping( @Resource(name="dsuseMgtReceiptService")
name = "신청서접수" private DsuseMgtReceiptService dsuseMgtReceiptService;
, value = {"/dsuseMgtReceipt.do"}
) @RequestMapping(value = "/bssh-popup.do", name="마약류 취급 업체 조회 팝업")
public ModelAndView dsuseMgtReceiptForm() { public ModelAndView bsshPopup(String openPage) {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView("adds/nims/bssh-popup");
mav.setViewName("adds/nims/dsuseMgtReceipt-main");
return mav.addObject("apiHost", apiHost); // 사용자 정보
//ManagedUser managedUser = (ManagedUser)currentUser().getUser();
return mav
.addObject("pageName", "bsshPopup") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefix", "bssh") // prefix
.addObject("infoPrefixUrl", "/adds/nims") // prefixUrl
.addObject("openPage", openPage)
.addObject("apiHost", apiHost);
} }
@RequestMapping( @RequestMapping(value = "/product-popup.do", name="마약류 제품 조회 팝업")
name = "결과[통보] 처리" public ModelAndView productPopup(String openPage) {
, value = {"/dsuseMgtRslt.do"} ModelAndView mav = new ModelAndView("adds/nims/product-popup");
)
public ModelAndView dsuseMgtRsltForm() { // 사용자 정보
ModelAndView mav = new ModelAndView(); //ManagedUser managedUser = (ManagedUser)currentUser().getUser();
mav.setViewName("adds/nims/dsuseMgtRslt-main");
return mav.addObject("apiHost", apiHost); return mav
}*/ .addObject("pageName", "productMain") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefix", "product") // prefix
.addObject("infoPrefixUrl", "/adds/nims") // prefixUrl
.addObject("openPage", openPage)
.addObject("apiHost", apiHost);
}
} }

@ -1,133 +0,0 @@
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.BsshQuery;
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 BsshController extends AbstractController {
public static final String CLASS_URL = "/adds/nims";
public class METHOD_URL {
public static final String
bsshhMain = "/bssh-main.do" // 부과 제외 관리 메인 화면
, getbsshList = "/bssh-list.do" // 부과 제외 대장 목록 조회
// , getLevyExclusionInfo = "/020/info.do" // 부과 제외 대장 조회
// , createLevyExclusion = "/020/create.do" // 부과 제외 대장 등록
;
}
@Resource(name="dsuseMgtReceiptService")
private DsuseMgtReceiptService dsuseMgtReceiptService;
@RequestMapping(name="마약류폐기 신청서 접수 메인", value=METHOD_URL.bsshhMain)
public ModelAndView bsshMain(String openPage) {
ModelAndView mav = new ModelAndView("adds/nims/bssh-main");
// 사용자 정보
//ManagedUser managedUser = (ManagedUser)currentUser().getUser();
return mav
.addObject("pageName", "bsshMain") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefix", "bssh") // prefix
.addObject("infoPrefixUrl", "/adds/nims") // prefixUrl
.addObject("openPage", openPage)
;
}
@RequestMapping(name="마약류폐기 신청서 접수 조회", value=METHOD_URL.getbsshList)
public ModelAndView getbsshList(BsshQuery query) throws JsonProcessingException, ParseException {
ModelAndView mav = new ModelAndView();
System.out.println("취급자 조회 : " + query.getSchBsshCd());
mav.setViewName("jsonView");
String sMethod = "POST";
DataObject dataObject = new DataObject();
dataObject.put("k","");
dataObject.put("fg","1");
dataObject.put("pg","1");
dataObject.put("bi","");
dataObject.put("hp","");
dataObject.put("bn",query.getSchBsshNm());
dataObject.put("bc",query.getSchBsshCd());
dataObject.put("ymd","");
dataObject.put("fg2","1");
dataObject.put("dbSkipYn","N");
dataObject.put("userId","suji");
ObjectMapper mapper = new ObjectMapper();
String sJsonData = mapper.writeValueAsString(dataObject);
Consumer<Request> configurer = (request) -> {
request.uri("http://localhost:9076/api/biz/nims/v1/getNimsBsshInfoSt")
.contentType(ContentType.JSON)
.bodyData(sJsonData);
};
HttpResponse<String> hresp = null;
if(sMethod.equals("POST")) {
hresp = new WebClient()
.post(configurer);
} else if(sMethod.equals("GET")) {
hresp = new WebClient()
.get(configurer);
}
String resBody = hresp.body();
JSONParser parser = new JSONParser();
Object obj = parser.parse( resBody );
JSONObject jsonObj = (JSONObject) obj;
JSONArray jsonData = (JSONArray) jsonObj.get("data");
System.out.println(jsonData.get(0).toString());
ModelAndView result = new ModelAndView("jsonView");
result.addObject("bsshMainList", jsonData) // 발송 정보
;
return result;
}
}

@ -1,120 +0,0 @@
package cokr.xit.adds.nims.web;
import java.net.http.HttpResponse;
import java.util.List;
import java.util.function.Consumer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.ParseException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import cokr.xit.adds.cmm.model.ApiBaseResponse;
import cokr.xit.adds.nims.ProductQuery;
import cokr.xit.foundation.data.DataObject;
import cokr.xit.foundation.data.JSON;
import cokr.xit.foundation.web.AbstractController;
import cokr.xit.foundation.web.WebClient;
import cokr.xit.foundation.web.WebClient.Request;
import cokr.xit.foundation.web.WebClient.Request.ContentType;
@Controller
@RequestMapping(
name = "마약류폐기 신청서 접수",
value = {"/adds/nims"}
)
public class ProductController extends AbstractController {
@Value("${app.api.host:}")
private String apiHost;
private static final String CLASS_URL = "/adds/nims";
private final JSON json = new JSON();
public class METHOD_URL {
public static final String
producthMain = "/product-main.do" // 부과 제외 관리 메인 화면
, getProductList = "/product-list.do" // 부과 제외 대장 목록 조회
// , getLevyExclusionInfo = "/020/info.do" // 부과 제외 대장 조회
// , createLevyExclusion = "/020/create.do" // 부과 제외 대장 등록
;
}
@RequestMapping(name="마약류폐기 신청서 접수 메인", value=METHOD_URL.producthMain)
public ModelAndView bsshMain(String openPage) {
ModelAndView mav = new ModelAndView("adds/nims/product-main");
// 사용자 정보
//ManagedUser managedUser = (ManagedUser)currentUser().getUser();
return mav
.addObject("pageName", "productMain") // View(jsp)에서 사용할 id 뒤에 붙일 suffix
.addObject("infoPrefix", "product") // prefix
.addObject("infoPrefixUrl", "/adds/nims") // prefixUrl
.addObject("openPage", openPage)
.addObject("apiHost", apiHost);
}
@RequestMapping(name="마약류폐기 신청서 접수 조회", value=METHOD_URL.getProductList)
public ModelAndView getbsshList(ProductQuery query) throws JsonProcessingException, ParseException {
ModelAndView mav = new ModelAndView();
System.out.println("취급자 조회 : " + query.getSchProductCd());
mav.setViewName("jsonView");
String sMethod = "POST";
DataObject dataObject = new DataObject();
//dataObject.put("k","");
dataObject.put("fg","1");
dataObject.put("pg","1");
dataObject.put("ymd","");
dataObject.put("fg2","");
//query.setSchProductNm("아네폴주사");
if(!isEmpty(query.getSchProductCd())) dataObject.put("p",query.getSchProductCd());
if(!isEmpty(query.getSchProductNm())) dataObject.put("pn",query.getSchProductNm());
dataObject.put("dbSkipYn","N");
dataObject.put("userId","suji");
Consumer<Request> configurer = (request) -> {
request.uri("http://localhost:9076/api/biz/nims/v1/getNimsProductInfoKd")
.contentType(ContentType.JSON)
.bodyData(json.stringify(dataObject));
};
HttpResponse<String> hresp = null;
if(sMethod.equals("POST")) {
hresp = new WebClient()
.post(configurer);
} else if(sMethod.equals("GET")) {
hresp = new WebClient()
.get(configurer);
}
String resBody = hresp.body();
ApiBaseResponse<List<JSONObject>> jsonData = json.parse(resBody, new TypeReference<>() {});
// ApiBaseResponse(code=400, message=상품번호 또는 상품명은 필수 입니다, data=null, totalCount=0, success=false, responseTime=2024-06-12 15:35:24)
if(!jsonData.getSuccess()){
// error 처리
// throw new Exception(data.getMessage());
}
List<JSONObject> data = jsonData.getData();
System.out.println(resBody);
ModelAndView result = new ModelAndView("jsonView");
result.addObject("productMainList", data);
return result;
}
}

@ -95,10 +95,10 @@
//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" />', load : '<c:url value="${apiHost}/api/biz/nims/v1/getNimsBsshInfoSt" />',
} }
, prefix: "bsshMain" , prefix: "bsshPopup"
, prefixName: "마약류 취급업체 조회" , prefixName: "마약류 취급업체 조회"
, keymapper: info => info ? info.bsshCd : "" , keymapper: info => info ? info.bsshCd : ""
, dataGetter : obj => obj => { , dataGetter : obj => {
if (!obj.success){ if (!obj.success){
dialog.alert(obj.message); dialog.alert(obj.message);
return false; return false;
@ -126,9 +126,9 @@
$("#paging--${pageName}").setPaging({ $("#paging--${pageName}").setPaging({
list: $P.control.dataset list: $P.control.dataset
, prefix: "paging--${pageName}" , prefix: "paging--${pageName}"
, start: obj.bsshMainStart , start: obj.bsshPopupStart
, totalSize: obj.bsshMainTotal , totalSize: obj.bsshPopupTotal
, fetchSize: obj.bsshMainFetch , fetchSize: obj.bsshPopupFetch
, func: "pageObject['${pageName}'].control.load({index})" , func: "pageObject['${pageName}'].control.load({index})"
}); });
@ -199,7 +199,13 @@
$P.fnSearchList = () => { $P.fnSearchList = () => {
// 검색조건 // 검색조건
// FIXME: 업체명 또는 식별번호중 하나는 필수 // FIXME: 업체명 또는 식별번호중 하나는 필수
$P.control.query = $P.formFields.get(); // 검색 조건 $P.control.query = {
... $P.formFields.get(),
bc: $P.formFields.get().schBsshCd,
bn: $P.formFields.get().schBsshNm,
dbSkipYn: "N",
userId: "${currentUser.account}"
};
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수 $P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수
$P.control.query.delYn = "N"; // 삭제 여부 $P.control.query.delYn = "N"; // 삭제 여부
@ -212,9 +218,10 @@
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("bsshMainDialog"); dialog.close("bsshPopupDialog");
} }
}); });
} }

@ -304,7 +304,7 @@
let params = {}; let params = {};
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/bssh-main.do") url : wctx.url("/adds/nims/bssh-popup.do")
, data : params || {} , data : params || {}
, success : resp => { , success : resp => {
dialog.open({ dialog.open({

@ -258,11 +258,11 @@
let params = {}; let params = {};
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/bssh-main.do") url : wctx.url("/adds/nims/bssh-popup.do")
, data : params || {} , data : params || {}
, success : resp => { , success : resp => {
dialog.open({ dialog.open({
id : "bsshMainDialog" id : "bsshPopupDialog"
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.control.infoSize , size : $P.control.infoSize

@ -368,11 +368,11 @@
let params = {openPage : "frmSearch--${pageName}"}; let params = {openPage : "frmSearch--${pageName}"};
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/bssh-main.do") url : wctx.url("/adds/nims/bssh-popup.do")
, data : params , data : params
, success : resp => { , success : resp => {
dialog.open({ dialog.open({
id : "bsshMainDialog" id : "bsshPopupDialog"
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.control.infoSize , size : $P.control.infoSize

@ -48,7 +48,7 @@
<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">
<label for="product--${pageName}">폐기정보 상세</label> <label for="product--${pageName}">폐기 신청 정보 상세</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">
<label for="prductNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품명</label> <label for="prductNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품명</label>
@ -103,16 +103,16 @@
<thead class="sticky-thead"> <thead class="sticky-thead">
<tr id="theadTr--productList" <tr id="theadTr--productList"
data-by="by--productList" data-by-output="byOutput--productList" data-main-option="mainOption--productList" data-sub-option="subOption--productList"> data-by="by--productList" data-by-output="byOutput--productList" data-main-option="mainOption--productList" data-sub-option="subOption--productList">
<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: 146.156px;">제품코드</th>
<th class="sorting sorting_asc" aria-sort="ascending" style="width: 300.719px;">제품명</th>
<th class="sorting" style="width: 230.469px;">폐기 수량</th>
<th class="sorting" style="width: 230.469px;">유효기간</th>
<th class="sorting" style="width: 160.141px;">제조 번호</th> <th class="sorting" style="width: 160.141px;">제조 번호</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> <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>
<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> </tr>
</thead> </thead>
@ -120,14 +120,14 @@
</tbody> </tbody>
<template id="productListRow--productList"> <template id="productListRow--productList">
<tr data-key="{prductCd}"> <tr data-key="{prductCd}">
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prductNm}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prductCd}</td> <td class="cmn text-center" {onclick}="" {ondblclick}="">{prductCd}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prductNm}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{pceQy}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prdValidDe}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{mnfNo}</td> <td class="cmn text-center" {onclick}="" {ondblclick}="">{mnfNo}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{mnfSeq}</td> <td class="cmn text-center" {onclick}="" {ondblclick}="">{mnfSeq}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prdValidDe}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{minDistbQy}</td> <td class="cmn text-center" {onclick}="" {ondblclick}="">{minDistbQy}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{minDistbUnit}</td> <td class="cmn text-center" {onclick}="" {ondblclick}="">{minDistbUnit}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{pceQy}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{pceUnit}</td> <td class="cmn text-center" {onclick}="" {ondblclick}="">{pceUnit}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{dsuseQy}</td> <td class="cmn text-center" {onclick}="" {ondblclick}="">{dsuseQy}</td>
<td class="cmn text-center aaaa" {onclick}="" {ondblclick}=""></td> <td class="cmn text-center aaaa" {onclick}="" {ondblclick}=""></td>
@ -250,11 +250,11 @@
let params = {openPage : "bssh--${pageName}"}; let params = {openPage : "bssh--${pageName}"};
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/bssh-main.do") url : wctx.url("/adds/nims/bssh-popup.do")
, data : params , data : params
, success : resp => { , success : resp => {
dialog.open({ dialog.open({
id : "bsshMainDialog" id : "bsshPopupDialog"
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.control.infoSize , size : $P.control.infoSize
@ -269,7 +269,7 @@
let params = {openPage : "product--${pageName}"}; let params = {openPage : "product--${pageName}"};
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/product-main.do") url : wctx.url("/adds/nims/product-popup.do")
, data : params , data : params
, success : resp => { , success : resp => {
dialog.open({ dialog.open({
@ -370,7 +370,34 @@
//추가 //추가
$P.fnAdd = () => { $P.fnAdd = () => {
if(!$P.productFormFields.get().prductCd){
dialog.alert({
content: "제품 정보를 입력해주세요."
});
return false;
}
if(!$P.productFormFields.get().dsuseQy){
dialog.alert({
content: "폐기수량을 입력해 주세요"
});
return false;
}
let dupData = $P.productList
.getDataset()
.filter(item => item.prductCd == $P.productFormFields.get().prductCd);
if(dupData.length > 0){
dialog.alert({
content: "등록한 상품[" + $P.productFormFields.get().prductCd + "]입니다"
});
return false;
}
$P.productList.addData([$P.productFormFields.get()]); $P.productList.addData([$P.productFormFields.get()]);
// FIXME: 상품필드 초기화 코드 추가
//
} }
$P.fnDel = () => { $P.fnDel = () => {

@ -389,11 +389,11 @@
let params = {openPage : "frmSearch--${pageName}"}; let params = {openPage : "frmSearch--${pageName}"};
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/bssh-main.do") url : wctx.url("/adds/nims/bssh-popup.do")
, data : params , data : params
, success : resp => { , success : resp => {
dialog.open({ dialog.open({
id : "bsshMainDialog" id : "bsshPopupDialog"
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.control.infoSize , size : $P.control.infoSize

@ -190,11 +190,11 @@
let params = {}; let params = {};
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/bssh-main.do") url : wctx.url("/adds/nims/bssh-popup.do")
, data : params || {} , data : params || {}
, success : resp => { , success : resp => {
dialog.open({ dialog.open({
id : "bsshMainDialog" id : "bsshPopupDialog"
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.control.infoSize , size : $P.control.infoSize

@ -369,11 +369,11 @@
let params = {openPage : "frmSearch--${pageName}"}; let params = {openPage : "frmSearch--${pageName}"};
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/bssh-main.do") url : wctx.url("/adds/nims/bssh-popup.do")
, data : params , data : params
, success : resp => { , success : resp => {
dialog.open({ dialog.open({
id : "bsshMainDialog" id : "bsshPopupDialog"
, title : dialogTitle , title : dialogTitle
, content : resp , content : resp
, size : $P.control.infoSize , size : $P.control.infoSize

@ -37,9 +37,7 @@
<thead> <thead>
<tr> <tr>
<th class="sorting" style="width: 146.156px;">제품코드</th> <th class="sorting" style="width: 146.156px;">제품코드</th>
<th class="sorting" style="width: 160.141px;">제품명</th> <th class="sorting" style="width: 300.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> <th class="sorting" style="width: 230.469px;">제조번호</th>
<th class="sorting" style="width: 230.469px;">제조일련번호</th> <th class="sorting" style="width: 230.469px;">제조일련번호</th>
@ -47,6 +45,8 @@
<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> <th class="sorting" style="width: 230.469px;">낱개단위명</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>
</tr> </tr>
</thead> </thead>
@ -56,8 +56,6 @@
<tr data-key="{prductCd}"> <tr data-key="{prductCd}">
<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-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{nrcdSeNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prtmSeNm}</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>
@ -65,6 +63,8 @@
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{stdPackngStleNm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{stdPackngStleNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdTotPceQy}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdTotPceQy}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{pceCoUnitNm}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{pceCoUnitNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{nrcdSeNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prtmSeNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{bsshCd}</td> <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{bsshCd}</td>
</tr> </tr>
</template> </template>
@ -99,7 +99,6 @@
**************************************************************************/ **************************************************************************/
$P.control = new DatasetControl({ $P.control = new DatasetControl({
urls : { urls : {
//load : wctx.url("/adds/nims/product-list.do")
load : '<c:url value="${apiHost}/api/biz/nims/v1/getNimsProductInfoKdAndMnfSeqInfo" />', load : '<c:url value="${apiHost}/api/biz/nims/v1/getNimsProductInfoKdAndMnfSeqInfo" />',
} }
, prefix: "productMain" , prefix: "productMain"
@ -128,9 +127,6 @@
prdValidDe: info.prdValidDe prdValidDe: info.prdValidDe
})); }));
}).flat(); }).flat();
//console.log(JSON.stringify(newData));
//return newData;
} }
, appendData: true , appendData: true
, infoSize: "xl" , infoSize: "xl"
@ -224,26 +220,13 @@
**************************************************************************/ **************************************************************************/
$P.fnSearchList = () => { $P.fnSearchList = () => {
<%-- $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.control.query = {
... $P.formFields.get(), ... $P.formFields.get(),
p: $P.formFields.get().schProductCd, p: $P.formFields.get().schProductCd,
pn: $P.formFields.get().schProductNm, pn: $P.formFields.get().schProductNm,
dbSkipYn: "N", dbSkipYn: "N",
// FIXME: userId 는 현재 로그인한 사용자의 ID로 변경 - 공통 처리후 userId: "${currentUser.account}"
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"; // 삭제 여부
Loading…
Cancel
Save