|
|
@ -145,7 +145,6 @@
|
|
|
|
* script 진입
|
|
|
|
* script 진입
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
$(document).ready(function() {
|
|
|
|
$(document).ready(function() {
|
|
|
|
let totalDs = null;
|
|
|
|
|
|
|
|
// pageObject
|
|
|
|
// pageObject
|
|
|
|
let $P = pageObject["${pageName}"];
|
|
|
|
let $P = pageObject["${pageName}"];
|
|
|
|
|
|
|
|
|
|
|
@ -162,18 +161,7 @@
|
|
|
|
, prefix: "dsuseMgtDsuseQyByPrdStatistics"
|
|
|
|
, prefix: "dsuseMgtDsuseQyByPrdStatistics"
|
|
|
|
, prefixName: "제품별 폐기 현황"
|
|
|
|
, prefixName: "제품별 폐기 현황"
|
|
|
|
, keymapper: info => info ? info.prduct_cd : ""
|
|
|
|
, keymapper: info => info ? info.prduct_cd : ""
|
|
|
|
, dataGetter: obj => {
|
|
|
|
, dataGetter: obj => obj.${infoPrefix}List
|
|
|
|
let list = obj.${infoPrefix}List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TOTAL 데이터
|
|
|
|
|
|
|
|
totalDs = new Dataset({
|
|
|
|
|
|
|
|
keymapper: info => info? info.dept_cd : ''
|
|
|
|
|
|
|
|
, dataGetter: obj => obj
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
totalDs.setData(list.filter(d => d.dept_cd === 'TOTAL'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return list.filter(d => d.dept_cd !== 'TOTAL');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
, appendData: true
|
|
|
|
, appendData: true
|
|
|
|
, infoSize: "xl"
|
|
|
|
, infoSize: "xl"
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -190,11 +178,12 @@
|
|
|
|
$P.control.onDatasetChange = (obj) => {
|
|
|
|
$P.control.onDatasetChange = (obj) => {
|
|
|
|
$P.renderList(obj.${infoPrefix}Total);
|
|
|
|
$P.renderList(obj.${infoPrefix}Total);
|
|
|
|
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({
|
|
|
|
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({
|
|
|
|
list: $P.control.dataset
|
|
|
|
//list: $P.control.dataset
|
|
|
|
, prefix: "${infoPrefix}Paging--${pageName}"
|
|
|
|
prefix: "${infoPrefix}Paging--${pageName}"
|
|
|
|
, start: obj.${infoPrefix}Start
|
|
|
|
, start: obj.${infoPrefix}Start
|
|
|
|
, totalSize: $P.control.dataset.length
|
|
|
|
, totalSize: $P.control.dataset.length - 1
|
|
|
|
, fetchSize: obj.${infoPrefix}Fetch
|
|
|
|
, fetchSize: obj.${infoPrefix}Fetch
|
|
|
|
|
|
|
|
, dataLength: $P.control.dataset.length - 1
|
|
|
|
, func: "pageObject['${pageName}'].control.load({index})"
|
|
|
|
, func: "pageObject['${pageName}'].control.load({index})"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -229,28 +218,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
let replacer = (str, dataItem) => {
|
|
|
|
let replacer = (str, dataItem) => {
|
|
|
|
str = str.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("prduct_cd") + "');")
|
|
|
|
str = str.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("prduct_cd") + "');")
|
|
|
|
str = str.replace(/{fw-bold-if-total}/gi, "");
|
|
|
|
if(dataItem.getValue("dept_cd") === "TOTAL"){
|
|
|
|
return str;
|
|
|
|
str = str.replace(/{fw-bold-if-total}/gi, "fw-bold");
|
|
|
|
|
|
|
|
str = str.replace(/{ROW_NUM}/gi, "")
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
str = str.replace(/{fw-bold-if-total}/gi, "");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return str;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
|
|
|
|
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
|
|
|
|
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
|
|
|
|
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
|
|
|
|
|
|
|
|
|
|
|
|
$("#tbody--${pageName}").html(trs.join());
|
|
|
|
$("#tbody--${pageName}").html(trs.join());
|
|
|
|
|
|
|
|
|
|
|
|
// TOTAL 데이터 추가
|
|
|
|
|
|
|
|
let replacer2 = (str, dataItem) => {
|
|
|
|
|
|
|
|
str = str.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("prduct_cd") + "');")
|
|
|
|
|
|
|
|
str = str.replace(/{fw-bold-if-total}/gi, "fw-bold");
|
|
|
|
|
|
|
|
str = str.replace(/{ROW_NUM}/gi, "");
|
|
|
|
|
|
|
|
return str;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let tr = totalDs.inStrings(foundTr.outerHTML, replacer2);
|
|
|
|
|
|
|
|
$("#tbody--${pageName}").append(tr);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.control.getBsshInfo = (gdccId) => {
|
|
|
|
$P.control.getBsshInfo = (gdccId) => {
|
|
|
|
let dialogTitle = "마약류 취급업체 조회";
|
|
|
|
let dialogTitle = "마약류 취급업체 조회";
|
|
|
|
let params = {openPage : "frmSearch--${pageName}"};
|
|
|
|
let params = {openPage : "frmSearch--${pageName}"};
|
|
|
|