|
|
|
@ -26,8 +26,8 @@
|
|
|
|
|
<span id="tempArea--${pageName}" hidden></span>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
LoadScript("sprt01010Script","/resources/js/fims/sprt/sprt01010.js?ver=${ver}");
|
|
|
|
|
|
|
|
|
|
LoadScript("integrationSearchScript","/resources/js/fims/sprt/integrationSearch.js");
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* Global Variable
|
|
|
|
|
**************************************************************************/
|
|
|
|
@ -51,72 +51,39 @@ $(document).ready(function() {
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.integrationSearchControl = new IntegrationSearchControl({
|
|
|
|
|
dataGetter: obj => Array.isArray(obj) ? obj : [],
|
|
|
|
|
appendData: false,
|
|
|
|
|
keymapper: data => data ? data.CRDN_ID : "",
|
|
|
|
|
urls: {
|
|
|
|
|
load: wctx.url("/sprt/sprt01/010/list.do") // 검색
|
|
|
|
|
},
|
|
|
|
|
formats: {
|
|
|
|
|
CRDN_YMD_TM: datetimeFormat
|
|
|
|
|
, CRDN_STTS_CHG_YMD: dateFormat
|
|
|
|
|
, CVLCPT_RCPT_YMD: dateFormat
|
|
|
|
|
, LEVY_EXCL_YMD: dateFormat
|
|
|
|
|
, ADVNTCE_DUDT_YMD: dateFormat
|
|
|
|
|
, LEVY_YMD: dateFormat
|
|
|
|
|
, FRST_DUDT_YMD: dateFormat
|
|
|
|
|
, DUDT_YMD: dateFormat
|
|
|
|
|
, DUDT_AFTR_YMD: dateFormat
|
|
|
|
|
, RCVMT_YMD: dateFormat
|
|
|
|
|
, FFNLG_CRDN_AMT: numberFormat
|
|
|
|
|
, FFNLG_AMT: numberFormat
|
|
|
|
|
, ADVNTCE_AMT: numberFormat
|
|
|
|
|
, LEVY_AMT: numberFormat
|
|
|
|
|
, LEVY_PCPTAX: numberFormat
|
|
|
|
|
, LEVY_ADAMT: numberFormat
|
|
|
|
|
, RCVMT_AMT: numberFormat
|
|
|
|
|
, RCVMT_PCPTAX: numberFormat
|
|
|
|
|
, RCVMT_ADAMT: numberFormat
|
|
|
|
|
, SUM_AMT: numberFormat
|
|
|
|
|
, MINAP_AMT: numberFormat
|
|
|
|
|
, DUDT_AFTR_AMT: numberFormat
|
|
|
|
|
, REG_DT: datetimeFormat
|
|
|
|
|
, MDFCN_DT: datetimeFormat
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$P.ctrl = newSprt01010Control();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl 이벤트
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// Dataset 변경 이벤트
|
|
|
|
|
$P.integrationSearchControl.upDataset.onDatasetChange = (obj, option) => {
|
|
|
|
|
$P.ctrl.upDataset.onDatasetChange = (obj, option) => {
|
|
|
|
|
var upActiveTab = $("#upGridTabs--${pageName}").find("button.active").text().trim();
|
|
|
|
|
$P.renderList("up", upActiveTab);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.integrationSearchControl.downDataset.onDatasetChange = (obj, option) => {
|
|
|
|
|
$P.ctrl.downDataset.onDatasetChange = (obj, option) => {
|
|
|
|
|
var downActiveTab = $("#downGridTabs--${pageName}").find("button.active").text().trim();
|
|
|
|
|
$P.renderList("down", downActiveTab);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 현재 선택 자료 변경 이벤트
|
|
|
|
|
$P.integrationSearchControl.upDataset.onCurrentChange = (DI) => {
|
|
|
|
|
$P.ctrl.upDataset.onCurrentChange = (DI) => {
|
|
|
|
|
if (!DI) return;
|
|
|
|
|
var key = DI.data.CRDN_ID;
|
|
|
|
|
$("#upTbody--${pageName}").setCurrentRow(key);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.integrationSearchControl.downDataset.onCurrentChange = (DI) => {
|
|
|
|
|
$P.ctrl.downDataset.onCurrentChange = (DI) => {
|
|
|
|
|
if (!DI) return;
|
|
|
|
|
var key = DI.data.CRDN_ID;
|
|
|
|
|
$("#downTbody--${pageName}").setCurrentRow(key);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 선택(체크) 변경 이벤트
|
|
|
|
|
$P.integrationSearchControl.upDataset.onSelectionChange = (selectedArr) => {
|
|
|
|
|
var DS = $P.integrationSearchControl.upDataset;
|
|
|
|
|
$P.ctrl.upDataset.onSelectionChange = (selectedArr) => {
|
|
|
|
|
var DS = $P.ctrl.upDataset;
|
|
|
|
|
var keys = selectedArr.map(item => DS.getKey(item));
|
|
|
|
|
|
|
|
|
|
$("#upTbody--${pageName}").find("input[type='checkbox']").each(function() {
|
|
|
|
@ -135,8 +102,8 @@ $(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.integrationSearchControl.downDataset.onSelectionChange = (selectedArr) => {
|
|
|
|
|
var DS = $P.integrationSearchControl.downDataset;
|
|
|
|
|
$P.ctrl.downDataset.onSelectionChange = (selectedArr) => {
|
|
|
|
|
var DS = $P.ctrl.downDataset;
|
|
|
|
|
var keys = selectedArr.map(item => DS.getKey(item));
|
|
|
|
|
|
|
|
|
|
$("#downTbody--${pageName}").find("input[type='checkbox']").each(function() {
|
|
|
|
@ -161,15 +128,15 @@ $(document).ready(function() {
|
|
|
|
|
let id = table[0].id;
|
|
|
|
|
if(id.startsWith("up")){
|
|
|
|
|
if(arg2 != null){
|
|
|
|
|
pageObject['${pageName}'].integrationSearchControl.upDataset.select(arg1, arg2);
|
|
|
|
|
pageObject['${pageName}'].ctrl.upDataset.select(arg1, arg2);
|
|
|
|
|
} else {
|
|
|
|
|
pageObject['${pageName}'].integrationSearchControl.upDataset.select(arg1);
|
|
|
|
|
pageObject['${pageName}'].ctrl.upDataset.select(arg1);
|
|
|
|
|
}
|
|
|
|
|
} else if(id.startsWith("down")){
|
|
|
|
|
if(arg2 != null){
|
|
|
|
|
pageObject['${pageName}'].integrationSearchControl.downDataset.select(arg1, arg2);
|
|
|
|
|
pageObject['${pageName}'].ctrl.downDataset.select(arg1, arg2);
|
|
|
|
|
} else {
|
|
|
|
|
pageObject['${pageName}'].integrationSearchControl.downDataset.select(arg1);
|
|
|
|
|
pageObject['${pageName}'].ctrl.downDataset.select(arg1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -211,8 +178,8 @@ $(document).ready(function() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.fnReset = () => {
|
|
|
|
|
$P.integrationSearchControl.upDataset.clear();
|
|
|
|
|
$P.integrationSearchControl.downDataset.clear();
|
|
|
|
|
$P.ctrl.upDataset.clear();
|
|
|
|
|
$P.ctrl.downDataset.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 검색 조건 파라미터 가져오기
|
|
|
|
@ -227,9 +194,9 @@ $(document).ready(function() {
|
|
|
|
|
$P.fnSearchList = () => {
|
|
|
|
|
|
|
|
|
|
// 검색조건
|
|
|
|
|
$P.integrationSearchControl.query = $P.getParams();
|
|
|
|
|
$P.ctrl.query = $P.getParams();
|
|
|
|
|
|
|
|
|
|
var query = $P.integrationSearchControl.query;
|
|
|
|
|
var query = $P.ctrl.query;
|
|
|
|
|
var minKeyword = false;
|
|
|
|
|
var keys = Object.keys(query);
|
|
|
|
|
for(var i=0; i < keys.length; i++){
|
|
|
|
@ -263,10 +230,10 @@ $(document).ready(function() {
|
|
|
|
|
$("#upGridTabs--${pageName}").find("button").eq(0).addClass("active");
|
|
|
|
|
$("#downGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active");
|
|
|
|
|
$("#downGridTabs--${pageName}").find("button").eq(0).addClass("active");
|
|
|
|
|
$P.integrationSearchControl.upDataset.clear();
|
|
|
|
|
$P.integrationSearchControl.downDataset.clear();
|
|
|
|
|
$P.ctrl.upDataset.clear();
|
|
|
|
|
$P.ctrl.downDataset.clear();
|
|
|
|
|
|
|
|
|
|
$P.integrationSearchControl.load();
|
|
|
|
|
$P.ctrl.load();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -276,7 +243,7 @@ $(document).ready(function() {
|
|
|
|
|
var cellDefs;
|
|
|
|
|
|
|
|
|
|
if(updown == "up"){
|
|
|
|
|
if($P.integrationSearchControl.upDataset.empty){
|
|
|
|
|
if($P.ctrl.upDataset.empty){
|
|
|
|
|
alert("조회된 자료가 없습니다.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -287,9 +254,9 @@ $(document).ready(function() {
|
|
|
|
|
getCellDefsForPrivacyCell
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$P.integrationSearchControl.query.gridType = "up";
|
|
|
|
|
$P.ctrl.query.gridType = "up";
|
|
|
|
|
} else {
|
|
|
|
|
if($P.integrationSearchControl.downDataset.empty){
|
|
|
|
|
if($P.ctrl.downDataset.empty){
|
|
|
|
|
alert("조회된 자료가 없습니다.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -300,12 +267,12 @@ $(document).ready(function() {
|
|
|
|
|
getCellDefsForPrivacyCell
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$P.integrationSearchControl.query.gridType = "down";
|
|
|
|
|
$P.ctrl.query.gridType = "down";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.integrationSearchControl.query.cellDefs = cellDefs;
|
|
|
|
|
$P.ctrl.query.cellDefs = cellDefs;
|
|
|
|
|
|
|
|
|
|
$P.integrationSearchControl.download();
|
|
|
|
|
$P.ctrl.download();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -318,19 +285,19 @@ $(document).ready(function() {
|
|
|
|
|
var DS;
|
|
|
|
|
|
|
|
|
|
if(updown == "up"){
|
|
|
|
|
DS = $P.integrationSearchControl.upDataset;
|
|
|
|
|
DS = $P.ctrl.upDataset;
|
|
|
|
|
} else {
|
|
|
|
|
DS = $P.integrationSearchControl.downDataset;
|
|
|
|
|
DS = $P.ctrl.downDataset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var replacer;
|
|
|
|
|
if(updown == "up"){
|
|
|
|
|
replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].integrationSearchControl.upDataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].ctrl.upDataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].getInfo('"+ dataItem.getValue("TASK_SE_CD") +"','" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
} else {
|
|
|
|
|
replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].integrationSearchControl.downDataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].ctrl.downDataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].getInfo('"+ dataItem.getValue("TASK_SE_CD") +"','" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -406,9 +373,9 @@ $(document).ready(function() {
|
|
|
|
|
var cur;
|
|
|
|
|
|
|
|
|
|
if(updown == "up"){
|
|
|
|
|
cur = $P.integrationSearchControl.upDataset.getCurrent();
|
|
|
|
|
cur = $P.ctrl.upDataset.getCurrent();
|
|
|
|
|
} else {
|
|
|
|
|
cur = $P.integrationSearchControl.downDataset.getCurrent();
|
|
|
|
|
cur = $P.ctrl.downDataset.getCurrent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(cur != null){
|
|
|
|
@ -424,9 +391,9 @@ $(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
var cur;
|
|
|
|
|
if(updown == "up"){
|
|
|
|
|
cur = $P.integrationSearchControl.upDataset.getCurrent();
|
|
|
|
|
cur = $P.ctrl.upDataset.getCurrent();
|
|
|
|
|
} else {
|
|
|
|
|
cur = $P.integrationSearchControl.downDataset.getCurrent();
|
|
|
|
|
cur = $P.ctrl.downDataset.getCurrent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(cur.length <= 0){
|
|
|
|
@ -441,10 +408,10 @@ $(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
var cur;
|
|
|
|
|
if(updown == "up"){
|
|
|
|
|
cur = $P.integrationSearchControl.upDataset;
|
|
|
|
|
cur = $P.ctrl.upDataset;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
cur = $P.integrationSearchControl.downDataset;
|
|
|
|
|
cur = $P.ctrl.downDataset;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -485,8 +452,8 @@ $(document).ready(function() {
|
|
|
|
|
//단속내역서,단속확인서
|
|
|
|
|
$P.fnPrintCrdn = () => {
|
|
|
|
|
|
|
|
|
|
var upDataset = $P.integrationSearchControl.upDataset;
|
|
|
|
|
var downDataset = $P.integrationSearchControl.downDataset;
|
|
|
|
|
var upDataset = $P.ctrl.upDataset;
|
|
|
|
|
var downDataset = $P.ctrl.downDataset;
|
|
|
|
|
|
|
|
|
|
if((upDataset.length <= 0) && (downDataset.length <= 0)){
|
|
|
|
|
dialog.alert("출력할 자료가 없습니다.");
|
|
|
|
@ -530,7 +497,7 @@ $(document).ready(function() {
|
|
|
|
|
//교부청구서,채권신고서
|
|
|
|
|
$P.fnPrintBill = () => {
|
|
|
|
|
|
|
|
|
|
var upDataset = $P.integrationSearchControl.upDataset;
|
|
|
|
|
var upDataset = $P.ctrl.upDataset;
|
|
|
|
|
|
|
|
|
|
if(upDataset.length <= 0){
|
|
|
|
|
dialog.alert("출력할 자료가 없습니다.");
|
|
|
|
@ -585,7 +552,7 @@ $(document).ready(function() {
|
|
|
|
|
//납부확인서
|
|
|
|
|
$P.fnPrintRcvmtConfirm = () => {
|
|
|
|
|
|
|
|
|
|
var downDataset = $P.integrationSearchControl.downDataset;
|
|
|
|
|
var downDataset = $P.ctrl.downDataset;
|
|
|
|
|
|
|
|
|
|
if(downDataset.length <= 0){
|
|
|
|
|
dialog.alert("출력할 자료가 없습니다.");
|
|
|
|
@ -607,7 +574,7 @@ $(document).ready(function() {
|
|
|
|
|
//사전통지서
|
|
|
|
|
$P.fnPrintAdvntce = () => {
|
|
|
|
|
|
|
|
|
|
var upDataset = $P.integrationSearchControl.upDataset;
|
|
|
|
|
var upDataset = $P.ctrl.upDataset;
|
|
|
|
|
|
|
|
|
|
if(upDataset.length <= 0){
|
|
|
|
|
dialog.alert("출력할 자료가 없습니다.");
|
|
|
|
@ -662,7 +629,7 @@ $(document).ready(function() {
|
|
|
|
|
//고지서
|
|
|
|
|
$P.fnPrintNht = () => {
|
|
|
|
|
|
|
|
|
|
var upDataset = $P.integrationSearchControl.upDataset;
|
|
|
|
|
var upDataset = $P.ctrl.upDataset;
|
|
|
|
|
|
|
|
|
|
if(upDataset.length <= 0){
|
|
|
|
|
dialog.alert("출력할 자료가 없습니다.");
|
|
|
|
@ -720,25 +687,25 @@ $(document).ready(function() {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var upDataset = $P.integrationSearchControl.upDataset;
|
|
|
|
|
var downDataset = $P.integrationSearchControl.downDataset;
|
|
|
|
|
var upDataset = $P.ctrl.upDataset;
|
|
|
|
|
var downDataset = $P.ctrl.downDataset;
|
|
|
|
|
|
|
|
|
|
if(upDataset.length > 0){
|
|
|
|
|
var info = upDataset.getData(crdnId);
|
|
|
|
|
if(info != null){
|
|
|
|
|
$P.integrationSearchControl.flag = "up";
|
|
|
|
|
$P.ctrl.flag = "up";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(downDataset.length > 0){
|
|
|
|
|
var info = downDataset.getData(crdnId);
|
|
|
|
|
if(info != null){
|
|
|
|
|
$P.integrationSearchControl.flag = "down";
|
|
|
|
|
$P.ctrl.flag = "down";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var params = {
|
|
|
|
|
callControlName : "pageObject['${pageName}'].integrationSearchControl"
|
|
|
|
|
callControlName : "pageObject['${pageName}'].ctrl"
|
|
|
|
|
, crdnId : crdnId
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -763,8 +730,8 @@ $(document).ready(function() {
|
|
|
|
|
$P.provide = {
|
|
|
|
|
"getInfo" : function(crdnId){
|
|
|
|
|
|
|
|
|
|
var upDataset = $P.integrationSearchControl.upDataset;
|
|
|
|
|
var downDataset = $P.integrationSearchControl.downDataset;
|
|
|
|
|
var upDataset = $P.ctrl.upDataset;
|
|
|
|
|
var downDataset = $P.ctrl.downDataset;
|
|
|
|
|
|
|
|
|
|
if(upDataset.length > 0){
|
|
|
|
|
var info = upDataset.getData(crdnId);
|
|
|
|
@ -784,8 +751,8 @@ $(document).ready(function() {
|
|
|
|
|
},
|
|
|
|
|
"isAllSameTask" : function(crdnIdArr){
|
|
|
|
|
|
|
|
|
|
var upArr = $P.integrationSearchControl.upDataset.getDataset();
|
|
|
|
|
var downArr = $P.integrationSearchControl.downDataset.getDataset();
|
|
|
|
|
var upArr = $P.ctrl.upDataset.getDataset();
|
|
|
|
|
var downArr = $P.ctrl.downDataset.getDataset();
|
|
|
|
|
var unionArr = [...upArr, ...downArr];
|
|
|
|
|
|
|
|
|
|
var filtered = unionArr.filter(item => crdnIdArr.includes(item.CRDN_ID));
|
|
|
|
|