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