새올요청자료 등록 기능 추가

main
이범준 1 year ago
parent 45f2f4bbbd
commit ea8ce1e498

@ -203,4 +203,19 @@ public class CrdnCvlcpt extends AbstractEntity {
*/
private java.lang.String mailCn;
/**
* ID
*/
private java.lang.String indivId;
/**
*
*/
private java.lang.String rcptYmd;
/**
*
*/
private java.lang.String pstNo;
}

@ -5,6 +5,7 @@ import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@ -20,4 +21,10 @@ public interface SaCvlcptIndviDmndMapper extends AbstractMapper {
*/
List<DataObject> selectDmndDataList(CrdnQuery query);
/** .
* @param crdnCvlcpt
* @return
*/
int insertDmndDataInfo(CrdnCvlcpt crdnCvlcpt);
}

@ -83,7 +83,7 @@ public interface CrdnCvlcptService {
* <li>nonlevyCaseList: </li>
* </ul>
*/
Map<String, Object> getCvlcptAnswerWordsInfo(CrdnQuery crdnQuery);
Map<String, Object> getCvlcptAnswerWordsInfo(CrdnQuery crdnQuery);
/** .
* @param saveData , crdnCvlcpt
@ -115,4 +115,10 @@ public interface CrdnCvlcptService {
*/
List<DataObject> getDmndDataList(CrdnQuery query);
/** .
* @param crdnCvlcpt
* @return
*/
boolean createDmndDataInfo(CrdnCvlcpt crdnCvlcpt);
}

@ -327,7 +327,19 @@ public class CrdnCvlcptMainBean extends AbstractComponent {
* @return
*/
public List<DataObject> selectDmndDataList(CrdnQuery query) {
query.setOrderBy("INDIV_ID");
return saCvlcptIndviDmndMapper.selectDmndDataList(query);
}
/** .
* @param crdnCvlcpt
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) {
return saCvlcptIndviDmndMapper.insertDmndDataInfo(crdnCvlcpt) == 1 ? true : false;
}
}

@ -732,4 +732,9 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
return crdnCvlcptMainBean.selectDmndDataList(query);
}
@Override
public boolean createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) {
return crdnCvlcptMainBean.createDmndDataInfo(crdnCvlcpt);
}
}

@ -12,6 +12,7 @@ import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.GlobalStngMapper;
import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.fims.cvlc.service.CrdnCvlcptService;
/** .<br />
@ -24,7 +25,9 @@ public class Cvlc04Controller extends ApplicationController {
public class METHOD_URL {
public static final String
getDmndDataList = "/010/list.do";
getDmndDataList = "/010/list.do",
createDmndDataInfo = "/010/create.do"
;
}
@Resource(name="crdnService")
@ -65,4 +68,24 @@ public class Cvlc04Controller extends ApplicationController {
}
/** .
* {@link CrdnCvlcService#createDmndDataInfo(crdnCvlcpt)}
* @param crdnCvlcpt
* @return jsonView
* <pre><code> {
* "saved": true, false
* }</code></pre>
*/
public ModelAndView createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) {
crdnCvlcpt.setSggCd(globalStngMapper.selectSggCdForCurrentUser());
boolean saved = false;
saved = crdnCvlcptService.createDmndDataInfo(crdnCvlcpt);
return new ModelAndView("jsonView")
.addObject("saved", saved);
}
}

@ -124,6 +124,12 @@ public class BpvController {
return super.getDmndDataList(query);
}
@Override
@RequestMapping(name="전용차로과태료업무 새올요청자료 등록", value=METHOD_URL.createDmndDataInfo)
public ModelAndView createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) {
return super.createDmndDataInfo(crdnCvlcpt);
}
}
@Controller

@ -126,6 +126,12 @@ public class DpvController {
return super.getDmndDataList(query);
}
@Override
@RequestMapping(name="장애인과태료업무 새올요청자료 등록", value=METHOD_URL.createDmndDataInfo)
public ModelAndView createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) {
return super.createDmndDataInfo(crdnCvlcpt);
}
}
@Controller

@ -124,6 +124,12 @@ public class EcaController {
return super.getDmndDataList(query);
}
@Override
@RequestMapping(name="전기차과태료업무 새올요청자료 등록", value=METHOD_URL.createDmndDataInfo)
public ModelAndView createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) {
return super.createDmndDataInfo(crdnCvlcpt);
}
}
@Controller

@ -129,6 +129,12 @@ public class PvsController {
return super.getDmndDataList(query);
}
@Override
@RequestMapping(name="주정차과태료업무 새올요청자료 등록", value=METHOD_URL.createDmndDataInfo)
public ModelAndView createDmndDataInfo(CrdnCvlcpt crdnCvlcpt) {
return super.createDmndDataInfo(crdnCvlcpt);
}
}
@Controller

@ -5,18 +5,19 @@
<select id="selectDmndDataList" parameterType="cokr.xit.fims.crdn.CrdnQuery" resultType="dataobject">
/* 새올요청자료 목록 조회(saCvlcptIndviDmndMapper.selectDmndDataList) */
<include refid="utility.paging-prefix"/>
SELECT SA.INDIV_ID
, SA.DMND_YMD
, SA.DMND_SE_CD
, SA.RCPT_YMD
, SA.PST_NO
, SA.CRDN_ID
, SA.STTS_CD
, SA.RSPNS_DT
SELECT SA.INDIV_ID <!-- 개별 ID -->
, SA.DMND_YMD <!-- 요청일자 -->
, SA.DMND_SE_CD <!-- 요청 구분 코드 -->
, SA.RCPT_YMD <!-- 접수 일자 -->
, SA.PST_NO <!-- 게시물 번호 -->
, SA.CRDN_ID <!-- 단속 ID -->
, SA.STTS_CD <!-- 상태 코드 -->
, FN_GET_CODE_NM('FIM063', SA.STTS_CD) AS STTS_NM <!-- 상태명 -->
, SA.RSPNS_DT <!-- 응답 일시 -->
, (SELECT USER_NM
FROM TB_USER
WHERE USER_ID = SA.RGTR
) AS RGTR
) AS RGTR <!-- 요청자 -->
FROM TB_SA_CVLCPT_INDIV_DMND SA
WHERE SA.SGG_CD = #{sggCd}
<if test="schDmndYmdFrom != null or schDmndYmdTo != null">
@ -27,4 +28,41 @@ SELECT SA.INDIV_ID
<include refid="utility.paging-suffix"/>
</select>
<insert id="insertDmndDataInfo" parameterType="cokr.xit.fims.cvlc.CrdnCvlcpt">
<selectKey resultType="string" keyProperty="indivId" keyColumn="NEW_ID" order="BEFORE">
SELECT
CONCAT(DATE_FORMAT(CURRENT_DATE, '%Y'), LPAD(CAST(IFNULL(MAX(SUBSTRING(INDIV_ID, 5)) + 1, 1) AS INT), 26, '0'))
AS NEW_ID
FROM TB_SA_CVLCPT_INDIV_DMND
</selectKey>
/* 새올요청자료 등록(saCvlcptIndviDmndMapper.insertDmndDataInfo) */
INSERT
INTO TB_SA_CVLCPT_INDIV_DMND (
INDIV_ID
, SGG_CD
, RCPT_YMD
, PST_NO
, DMND_YMD
, DMND_SE_CD
, STTS_CD
, REG_DT
, RGTR
, MDFCN_DT
, MDFR
)
VALUES (
#{indivId}
, #{sggCd}
, REPLACE(#{rcptYmd},'-','')
, LPAD(#{pstNo}, 6, '0')
, <include refid="utility.today" />
, '1'
, '0'
, <include refid="utility.now" />
, #{modifiedBy}
, <include refid="utility.now" />
, #{modifiedBy}
)
</insert>
</mapper>

@ -51,13 +51,13 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<label id="requestPaging--${pageName}PagingInfo" class="dataTables_info"
<label id="dmndPaging--${pageName}PagingInfo" class="dataTables_info"
role="status" aria-live="polite"></label>
<ul id="requestPaging--${pageName}" class="pagination pagination-primary">
<ul id="dmndPaging--${pageName}" class="pagination pagination-primary">
</ul>
</div>
<span class="container-window-btn-right">
<button type="button" id="btnOpenRequestPop--${pageName}"
<button type="button" id="btnOpenDmndPop--${pageName}"
class="btn btn-primary" title="요청 등록">요청 등록</button>
<button type="button" id="btnDelete--${pageName}"
class="btn btn-primary" title="한 건 삭제">한 건 삭제</button>
@ -73,7 +73,7 @@
style="overflow-x: scroll;height:550px;overflow-y: scroll;">
<table id="DataTables_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer">
<thead id="requestThead--${pageName}">
<thead id="dmndThead--${pageName}">
<tr data-by="by--${pageName}" data-by-output="byOutput--${pageName}"
data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th style="min-width: 80px;">No.</th>
@ -86,8 +86,8 @@
<th style="min-width: 80px;">상태</th>
</tr>
</thead>
<tbody id="requestTbody--${pageName}"></tbody>
<template id="requestRow--${pageName}">
<tbody id="dmndTbody--${pageName}"></tbody>
<template id="dmndRow--${pageName}">
<tr data-key="{INDIV_ID}">
<td onclick="{onclick}" class="text-end">{ROW_NUM}</td>
<td onclick="{onclick}" class="text-center">{DMND_YMD}</td>
@ -96,10 +96,10 @@
<td onclick="{onclick}" class="text-center">{PST_NO}</td>
<td onclick="{onclick}" class="text-center">{RGTR}</td>
<td onclick="{onclick}" class="text-center">{RSPNS_DT}</td>
<td onclick="{onclick}" class="text-center">{STTS_CD}</td>
<td onclick="{onclick}" class="text-center">{STTS_NM}</td>
</tr>
</template>
<template id="requestNotFound--${pageName}">
<template id="dmndNotFound--${pageName}">
<tr>
<td valign="top" colspan="8" class="dataTables_empty text-center">요청 정보를 찾지 못했습니다.</td>
</tr>
@ -111,8 +111,7 @@
</div>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body bg-black text-white">
삭제 되었습니다.
<div id="toastText--${pageName}" class="toast-body bg-black text-white">
</div>
</div>
</div>
@ -125,21 +124,21 @@
<div class="content-backdrop fade"></div>
</div>
<template id="rcptRequestDialogTemplate--${pageName}">
<template id="seallDmndDialogTemplate--${pageName}">
<form id="frmEdit--${pageName}">
<div class="card">
<div class="row g-1">
<div class="col-md-12">
<label for="requestYmd--${pageName}"
<label for="rcptYmd--${pageName}"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">접수일자</label>
<input type="text" id="requestYmd--${pageName}" name="requestYmd" required
<input type="text" id="rcptYmd--${pageName}" name="rcptYmd" required
class="form-control form-date" data-fmt-type="day" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</div>
<div class="col-md-12">
<label for="listNo--${pageName}"
<label for="pstNo--${pageName}"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">목록번호</label>
<input type="text" id="listNo--${pageName}" name="listNo" required
<input type="text" id="pstNo--${pageName}" name="pstNo" required
class="form-control" type="text" maxlength="6" data-maxlengthb="6" data-fmt-type="zeroLpadNumber" />
</div>
</div>
@ -176,83 +175,83 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl
**************************************************************************/
$P.requestControl = new DatasetControl({
$P.dmndControl = new DatasetControl({
urls : { load : "", create : "", remove : "" },
dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.INDIV_ID : "",
formats : {
DMND_SE_CD : FIM062,
STTS_CD : FIM063,
DMND_YMD : dateFormat,
RCPT_YMD : dateFormat,
RSPNS_DT : datetimeFormat
}
});
$P.requestControl.defaultFetchSize = FETCH_XS;
$P.requestControl.untilPageNum = 0;
$P.requestControl.beforeCurrent = null;
$P.requestControl.tableRenderComplete = false;
$P.dmndControl.defaultFetchSize = FETCH_XS;
$P.dmndControl.untilPageNum = 0;
$P.dmndControl.beforeCurrent = null;
$P.dmndControl.tableRenderComplete = false;
/**************************************************************************
* DatasetControl.on
**************************************************************************/
$P.requestControl.onDatasetChange = (obj) => {
$P.dmndControl.onDatasetChange = (obj) => {
$P.renderRequestList(obj["Total"]);
$P.renderDmndList(obj["Total"]);
$("#requestPaging--${pageName}").setPagingInfo({
list: $P.requestControl.dataset,
prefix: "requestPaging--${pageName}",
$("#dmndPaging--${pageName}").setPagingInfo({
list: $P.dmndControl.dataset,
prefix: "dmndPaging--${pageName}",
start: obj["Start"],
totalSize: obj["Total"],
fetchSize: obj["Fetch"],
func: "pageObject['${pageName}'].requestControl.load({index})"
func: "pageObject['${pageName}'].dmndControl.load({index})"
});
$P.requestControl.tableRenderComplete = true;
$P.dmndControl.tableRenderComplete = true;
};
$P.requestControl.onCurrentChange = (item) => {
if(!$P.requestControl.tableRenderComplete){
$P.dmndControl.onCurrentChange = (item) => {
if(!$P.dmndControl.tableRenderComplete){
return;
}
if($P.requestControl.beforeCurrent != null){
var beforeCurrentKey = $P.requestControl.beforeCurrent.key;
var beforeCurrentIndex = $P.requestControl.beforeCurrent.index;
$P.requestControl.beforeCurrent = null;
if($P.dmndControl.beforeCurrent != null){
var beforeCurrentKey = $P.dmndControl.beforeCurrent.key;
var beforeCurrentIndex = $P.dmndControl.beforeCurrent.index;
$P.dmndControl.beforeCurrent = null;
if(!$P.requestControl.dataset.empty){
var info = $P.requestControl.dataset.getData(beforeCurrentKey);
if(!$P.dmndControl.dataset.empty){
var info = $P.dmndControl.dataset.getData(beforeCurrentKey);
if(info != null){
$P.requestControl.dataset.setCurrent(beforeCurrentKey,true);
$P.dmndControl.dataset.setCurrent(beforeCurrentKey,true);
return;
}
if(beforeCurrentIndex > ($P.requestControl.dataset.length - 1)){
info = $P.requestControl.dataset.getDataset()[$P.requestControl.dataset.length - 1];
if(beforeCurrentIndex > ($P.dmndControl.dataset.length - 1)){
info = $P.dmndControl.dataset.getDataset()[$P.dmndControl.dataset.length - 1];
} else {
info = $P.requestControl.dataset.getDataset()[beforeCurrentIndex];
info = $P.dmndControl.dataset.getDataset()[beforeCurrentIndex];
}
$P.requestControl.dataset.setCurrent(info["INDIV_ID"],true);
$P.dmndControl.dataset.setCurrent(info["INDIV_ID"],true);
return;
}
}
$P.requestControl.tableRenderComplete = false;
$P.dmndControl.tableRenderComplete = false;
if(!item){
$P.clickRequestList("", true);
$P.clickDmndList("", true);
} else {
$P.clickRequestList($P.requestControl.getCurrent()["INDIV_ID"], true);
$P.clickDmndList($P.dmndControl.getCurrent()["INDIV_ID"], true);
}
}
$P.requestControl.onRemove = (selected, resp) => {
$P.dmndControl.onRemove = (selected, resp) => {
if (resp.saved){
$("#toastText--${pageName}").html("삭제 되었습니다.");
$P.toast.show();
$P.refreshRequestList();
$P.refreshDmndList();
}
}
@ -263,31 +262,35 @@ $(document).ready(function(){
$('#schDmndYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schDmndYmdTo--${pageName}').datepicker('setDate', new Date());
$P.requestControl.setData([]);
$P.dmndControl.setData([]);
}
$P.fnResetAndChangeBiz = (taskSeCd) => {
$P.fnReset();
$P.requestControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/list.do");
$P.requestControl.urls.create = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/create.do");
$P.requestControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/remove.do");
$P.dmndControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/list.do");
$P.dmndControl.urls.create = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/create.do");
$P.dmndControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/remove.do");
}
$P.refreshRequestList = () => {
$P.requestControl.untilPageNum = $P.requestControl.query.pageNum;
$P.requestControl.query.fetchSize = $P.requestControl.defaultFetchSize * $P.requestControl.query.pageNum;
$P.requestControl.beforeCurrent = {
key : $P.requestControl.getCurrent()["INDIV_ID"],
index : $P.requestControl.getCurrent()["ROW_NUM"] - 1
};
$P.requestControl.load(1);
$P.refreshDmndList = () => {
$P.dmndControl.untilPageNum = $P.dmndControl.query.pageNum;
$P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize * $P.dmndControl.query.pageNum;
if(!$P.dmndControl.dataset.empty){
$P.dmndControl.beforeCurrent = {
key : $P.dmndControl.getCurrent()["INDIV_ID"],
index : $P.dmndControl.getCurrent()["ROW_NUM"] - 1
};
}
$P.dmndControl.load(1);
}
$P.searchRequestList = () => {
$P.searchDmndList = () => {
$P.requestControl.query = $P.getParams();
$P.dmndControl.query = $P.getParams();
$P.requestControl.load(1);
$P.dmndControl.load(1);
}
$P.scrollEnd = (obj) => {
@ -302,15 +305,15 @@ $(document).ready(function(){
if((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) <= el.outerHeight()){
obj.dataset.scrollStatus = "waiting";
$P.scrollRequestList();
$P.scrollDmndList();
}
}
$P.scrollRequestList = () => {
$P.requestControl.load($P.requestControl.query.pageNum + 1);
$P.scrollDmndList = () => {
$P.dmndControl.load($P.dmndControl.query.pageNum + 1);
}
$P.clickRequestList = (dataKey, auto) => {
$P.clickDmndList = (dataKey, auto) => {
if(dataKey == ""){
if(auto){
$("label[for='table-responsive--${pageName}']").trigger("refreshEnd");
@ -318,120 +321,135 @@ $(document).ready(function(){
return;
}
$("#requestTbody--${pageName}").setCurrentRow(dataKey);
$("#dmndTbody--${pageName}").setCurrentRow(dataKey);
if(!auto){
$P.requestControl.setCurrent(dataKey);
$P.dmndControl.setCurrent(dataKey);
} else {
$("label[for='table-responsive--${pageName}']").trigger("refreshEnd");
}
}
$P.renderRequestList = (total) => {
$P.renderDmndList = (total) => {
var requestList = $P.requestControl.dataset;
var empty = requestList.empty;
var notFound = [document.getElementById("requestNotFound--${pageName}").innerHTML];
var found = document.getElementById("requestRow--${pageName}").innerHTML;
var dmndList = $P.dmndControl.dataset;
var empty = dmndList.empty;
var notFound = [document.getElementById("dmndNotFound--${pageName}").innerHTML];
var found = document.getElementById("dmndRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickRequestList('" + dataItem.getValue("INDIV_ID") + "');");
var trs = empty ? notFound : requestList.inStrings(found, replacer);
$("#requestTbody--${pageName}").html(trs.join());
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickDmndList('" + dataItem.getValue("INDIV_ID") + "');");
var trs = empty ? notFound : dmndList.inStrings(found, replacer);
$("#dmndTbody--${pageName}").html(trs.join());
if(total == requestList.length){
if(total == dmndList.length){
$("#table-responsive--${pageName}").attr("data-scroll-status", "complete");
} else {
$("#table-responsive--${pageName}").removeAttr("data-scroll-status");
}
if($P.requestControl.untilPageNum != 0){
$P.requestControl.query.fetchSize = $P.requestControl.defaultFetchSize;
$P.requestControl.query.pageNum = $P.requestControl.untilPageNum;
$P.requestControl.untilPageNum = 0;
if($P.dmndControl.untilPageNum != 0){
$P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize;
$P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum;
$P.dmndControl.untilPageNum = 0;
}
}
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get();
data.fetchSize = $P.requestControl.defaultFetchSize;
data.fetchSize = $P.dmndControl.defaultFetchSize;
return data;
}
$P.fnRemove = (allCompleteData) => {
if(allCompleteData != null){
var ds = $P.requestControl.dataset.getDataset();
if(allCompleteData){
var ds = $P.dmndControl.dataset.getDataset();
var requestIds = ds.map(function(item){
if(item['STTS_CD'] == 'complete'){
var indivIds = ds.map(function(item){
if(item['STTS_CD'] == '9'){
return item["INDIV_ID"];
}
});
$P.requestControl.select(requestIds,true);
$P.dmndControl.select(indivIds,true);
} else {
var cur = $P.requestControl.getCurrent();
var cur = $P.dmndControl.getCurrent();
if(cur == null){
return;
}
var curKey = cur["INDIV_ID"];
$P.requestControl.select(curKey,true);
$P.dmndControl.select(curKey,true);
}
// TODO : 요청 삭제 서비스 //$P.requestControl.remove();
// TODO : 요청 삭제 서비스 //$P.dmndControl.remove();
}
$P.fnRemoveAllCompleteData = () => {
var cur = $P.requestControl.getCurrent();
var cur = $P.dmndControl.getCurrent();
if(cur == null){
return;
}
dialog.alert({
content : "완료된 자료를 모두 삭제하시겠습니까?"
, onOK : () => {
$P.fnRemove('allCompleteData');
content : "완료된 자료를 모두 삭제하시겠습니까?",
onOK : () => {
$P.fnRemove(true);
}
});
}
//요청 등록 팝업 호출
$P.fnOpenRequestPop = () => {
$P.fnOpenDmndPop = () => {
dialog.open({
id : "rcptRequestDialog--${pageName}",
id : "seallDmndDialog--${pageName}",
title : "새올 접수 요청",
content : document.getElementById("rcptRequestDialogTemplate--${pageName}").innerHTML,
content : document.getElementById("seallDmndDialogTemplate--${pageName}").innerHTML,
size : "lg",
init : () => {
initDatepicker("rcptRequestDialog--${pageName}");
$('#requestYmd--${pageName}').datepicker('setDate', new Date());
$('#btnCreate--${pageName}').on("click", () => $P.fnCreateRequest());
initDatepicker("seallDmndDialog--${pageName}");
$('#rcptYmd--${pageName}').datepicker('setDate', new Date());
$('#btnCreate--${pageName}').on("click", () => $P.fnCreateDmnd());
},
onClose : () => {}
});
}
//요청 등록
$P.fnCreateRequest = () => {
$P.fnCreateDmnd = () => {
if(!customValidate($("#frmEdit--${pageName} input"))) return;
var info = (new FimsFormFields("#frmEdit--${pageName}")).get();
// TODO : 요청 등록 서비스 //ajax
ajax.get({
url : $P.dmndControl.urls.create,
data : info,
success : resp => {
if(resp.saved){
dialog.close("seallDmndDialog--${pageName}");
$("#toastText--${pageName}").html("등록 되었습니다.");
$P.toast.show();
if(!$P.dmndControl.dataset.empty){
$P.refreshDmndList();
}
}
}
});
}
/**************************************************************************
* element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
$('#btnSearch--${pageName}').on('click', () => $P.searchRequestList());
$('#btnSearch--${pageName}').on('click', () => $P.searchDmndList());
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });
$("#btnOpenRequestPop--${pageName}").on("click", () => $P.fnOpenRequestPop());
$("#btnDelete--${pageName}").on("click", () => $P.fnRemove());
$("#btnOpenDmndPop--${pageName}").on("click", () => $P.fnOpenDmndPop());
$("#btnDelete--${pageName}").on("click", () => $P.fnRemove(false));
$("#btnDeleteAllCompleteData--${pageName}").on("click", () => $P.fnRemoveAllCompleteData());
/**************************************************************************

Loading…
Cancel
Save