|
|
|
@ -131,7 +131,7 @@
|
|
|
|
|
<td data-col="checkbox" class="text-center">
|
|
|
|
|
<input type="checkbox" class="form-check-input" />
|
|
|
|
|
</td>
|
|
|
|
|
<td data-col="otptNm" class="text-center">
|
|
|
|
|
<td data-col="otptArtclNm" class="text-center">
|
|
|
|
|
<select class="form-select" onchange="pageObject['${pageName}'].fnChangeComponent(this);">
|
|
|
|
|
{COMPONENTS}
|
|
|
|
|
</select>
|
|
|
|
@ -268,7 +268,7 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
for(var i=0; i < prototypeList.length; i++){
|
|
|
|
|
var p = prototypeList[i];
|
|
|
|
|
components += "<option value='"+p.otptNm+"' >"+p.dscrp+"</option>";
|
|
|
|
|
components += "<option value='"+p.otptArtclNm+"' >"+p.dscrp+"</option>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for(var i=0; i < dataList.length; i++){
|
|
|
|
@ -285,34 +285,34 @@ $(document).ready(function(){
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontColor"));
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontStyle"));
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"otptNm")).set(data.OTPT_NM);
|
|
|
|
|
$($P.fnGetElement(lastTr,"otptArtclNm")).set(data.OTPT_ARTCL_NM);
|
|
|
|
|
$($P.fnGetElement(lastTr,"componentType")).set(data.COMPONENT_TYPE);
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"leftPstn"))
|
|
|
|
|
.set(!isEmpty(data.LEFT_PSTN) ? data.LEFT_PSTN : $P.fnGetProto(prototypeList, data.OTPT_NM, "leftPstn"));
|
|
|
|
|
.set(!isEmpty(data.LEFT_PSTN) ? data.LEFT_PSTN : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "leftPstn"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"topPstn"))
|
|
|
|
|
.set(!isEmpty(data.TOP_PSTN) ? data.TOP_PSTN : $P.fnGetProto(prototypeList, data.OTPT_NM, "topPstn"));
|
|
|
|
|
.set(!isEmpty(data.TOP_PSTN) ? data.TOP_PSTN : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "topPstn"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"widthSz"))
|
|
|
|
|
.set(!isEmpty(data.WIDTH_SZ) ? data.WIDTH_SZ : $P.fnGetProto(prototypeList, data.OTPT_NM, "widthSz"));
|
|
|
|
|
.set(!isEmpty(data.WIDTH_SZ) ? data.WIDTH_SZ : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "widthSz"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"heightSz"))
|
|
|
|
|
.set(!isEmpty(data.HEIGHT_SZ) ? data.HEIGHT_SZ : $P.fnGetProto(prototypeList, data.OTPT_NM, "heightSz"));
|
|
|
|
|
.set(!isEmpty(data.HEIGHT_SZ) ? data.HEIGHT_SZ : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "heightSz"));
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"textSort"))
|
|
|
|
|
.set(!isEmpty(data.TEXT_SORT) ? data.TEXT_SORT : $P.fnGetProto(prototypeList, data.OTPT_NM, "textSort"));
|
|
|
|
|
.set(!isEmpty(data.TEXT_SORT) ? data.TEXT_SORT : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "textSort"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontNm"))
|
|
|
|
|
.set(!isEmpty(data.FONT_NM) ? data.FONT_NM : $P.fnGetProto(prototypeList, data.OTPT_NM, "fontNm"));
|
|
|
|
|
.set(!isEmpty(data.FONT_NM) ? data.FONT_NM : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "fontNm"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontSz"))
|
|
|
|
|
.set(!isEmpty(data.FONT_SZ) ? data.FONT_SZ : $P.fnGetProto(prototypeList, data.OTPT_NM, "fontSz"));
|
|
|
|
|
.set(!isEmpty(data.FONT_SZ) ? data.FONT_SZ : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "fontSz"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontColor"))
|
|
|
|
|
.set(!isEmpty(data.FONT_COLOR) ? data.FONT_COLOR : $P.fnGetProto(prototypeList, data.OTPT_NM, "fontColor"));
|
|
|
|
|
.set(!isEmpty(data.FONT_COLOR) ? data.FONT_COLOR : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "fontColor"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontStyle"))
|
|
|
|
|
.set(!isEmpty(data.FONT_STYLE) ? data.FONT_STYLE : $P.fnGetProto(prototypeList, data.OTPT_NM, "fontStyle"));
|
|
|
|
|
.set(!isEmpty(data.FONT_STYLE) ? data.FONT_STYLE : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "fontStyle"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#"+tbodyId).find("tr").each(function(){
|
|
|
|
|
|
|
|
|
|
if(tbodyId == "tbodyUnique--${pageName}"){
|
|
|
|
|
var el = $P.fnGetElement(this,"otptNm");
|
|
|
|
|
var el = $P.fnGetElement(this,"otptArtclNm");
|
|
|
|
|
$(el).attr("disabled","disabled");
|
|
|
|
|
$(el).addClass("no-bgi");
|
|
|
|
|
}
|
|
|
|
@ -328,7 +328,7 @@ $(document).ready(function(){
|
|
|
|
|
return $(tableRow).find("td[data-col='"+colName+"']").children("input, select").first()[0];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.fnGetProto = (prototypeList, otptNm, stngItemAttrNm) => {
|
|
|
|
|
$P.fnGetProto = (prototypeList, otptArtclNm, stngItemAttrNm) => {
|
|
|
|
|
if(stngItemAttrNm == "leftPstn" || stngItemAttrNm == "topPstn"){
|
|
|
|
|
var paperSeCd = $("#frmEdit--${pageName}").find("[name='paperSeCd']").val();
|
|
|
|
|
var paperNm = "";
|
|
|
|
@ -337,7 +337,7 @@ $(document).ready(function(){
|
|
|
|
|
} else if(paperSeCd == "02"){
|
|
|
|
|
paperNm = "letter";
|
|
|
|
|
}
|
|
|
|
|
var paperObj = prototypeList.find((item) => item.otptNm == otptNm)[paperNm];
|
|
|
|
|
var paperObj = prototypeList.find((item) => item.otptArtclNm == otptArtclNm)[paperNm];
|
|
|
|
|
if(paperObj == null){
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@ -348,22 +348,22 @@ $(document).ready(function(){
|
|
|
|
|
return paperObj["top"];
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
return prototypeList.find((item) => item.otptNm == otptNm)[stngItemAttrNm];
|
|
|
|
|
return prototypeList.find((item) => item.otptArtclNm == otptArtclNm)[stngItemAttrNm];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.choiceOtptNm = () => {
|
|
|
|
|
$P.choiceOtptArtclNm = () => {
|
|
|
|
|
$("#dropdownUniqueAdd--${pageName}").html("");
|
|
|
|
|
|
|
|
|
|
var prototypeList = $P.otptStngMap.unique.prototypeList;
|
|
|
|
|
var existArr = [];
|
|
|
|
|
|
|
|
|
|
$("#tbodyUnique--sprt01200-main tr").each(function(){
|
|
|
|
|
var el = $P.fnGetElement(this,"otptNm");
|
|
|
|
|
var el = $P.fnGetElement(this,"otptArtclNm");
|
|
|
|
|
existArr.push($(el).val());
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var selectableArr = prototypeList.filter(item => existArr.indexOf(item.otptNm) == -1);
|
|
|
|
|
var selectableArr = prototypeList.filter(item => existArr.indexOf(item.otptArtclNm) == -1);
|
|
|
|
|
|
|
|
|
|
var template = document.getElementById("dropdownTemplate--${pageNmae}");
|
|
|
|
|
|
|
|
|
@ -375,7 +375,7 @@ $(document).ready(function(){
|
|
|
|
|
} else {
|
|
|
|
|
for(var i=0; i < selectableArr.length; i++){
|
|
|
|
|
var li = template.innerHTML;
|
|
|
|
|
li = li.replace(/{onclick}/gi, "pageObject['${pageName}'].addRow('" + selectableArr[i].otptNm + "')");
|
|
|
|
|
li = li.replace(/{onclick}/gi, "pageObject['${pageName}'].addRow('" + selectableArr[i].otptArtclNm + "')");
|
|
|
|
|
li = li.replace(/{DSCRP}/gi, selectableArr[i].dscrp);
|
|
|
|
|
$("#dropdownUniqueAdd--${pageName}").append(li);
|
|
|
|
|
}
|
|
|
|
@ -383,12 +383,12 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//행 추가
|
|
|
|
|
$P.addRow = (otptNm) => {
|
|
|
|
|
$P.addRow = (otptArtclNm) => {
|
|
|
|
|
var paperSeCd = $("#frmEdit--${pageName}").find("[name='paperSeCd']").val();
|
|
|
|
|
var prototypeList;
|
|
|
|
|
var tbodyId;
|
|
|
|
|
|
|
|
|
|
if(otptNm == null || otptNm == ""){
|
|
|
|
|
if(otptArtclNm == null || otptArtclNm == ""){
|
|
|
|
|
prototypeList = $P.otptStngMap.multiple.prototypeList;
|
|
|
|
|
tbodyId = "tbodyMultiple--${pageName}";
|
|
|
|
|
} else {
|
|
|
|
@ -399,7 +399,7 @@ $(document).ready(function(){
|
|
|
|
|
var components = "<option value='' data-component-type=''>선택</option>";
|
|
|
|
|
for(var i=0; i < prototypeList.length; i++){
|
|
|
|
|
var p = prototypeList[i];
|
|
|
|
|
components += "<option value='"+p.otptNm+"' data-component-type='"+p.componentType+"'>"+p.dscrp+"</option>";
|
|
|
|
|
components += "<option value='"+p.otptArtclNm+"' data-component-type='"+p.componentType+"'>"+p.dscrp+"</option>";
|
|
|
|
|
}
|
|
|
|
|
var template = document.getElementById("found--${pageName}").innerHTML;
|
|
|
|
|
template = template.replace(/{OTPT_FORM_ID}/gi, "");
|
|
|
|
@ -412,36 +412,36 @@ $(document).ready(function(){
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontColor"));
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontStyle"));
|
|
|
|
|
|
|
|
|
|
if(otptNm != null && otptNm != ""){
|
|
|
|
|
if(otptArtclNm != null && otptArtclNm != ""){
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"otptNm")).set(otptNm);
|
|
|
|
|
$($P.fnGetElement(lastTr,"otptArtclNm")).set(otptArtclNm);
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"componentType"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptNm, "componentType"));
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "componentType"));
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"leftPstn"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptNm, "leftPstn"));
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "leftPstn"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"topPstn"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptNm, "topPstn"));
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "topPstn"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"widthSz"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptNm, "widthSz"));
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "widthSz"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"heightSz"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptNm, "heightSz"));
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "heightSz"));
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"textSort"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptNm, "textSort"));
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "textSort"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontNm"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptNm, "fontNm"));
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontNm"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontSz"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptNm, "fontSz"));
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontSz"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontColor"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptNm, "fontColor"));
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontColor"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontStyle"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptNm, "fontStyle"));
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontStyle"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(tbodyId == "tbodyUnique--${pageName}"){
|
|
|
|
|
var el = $P.fnGetElement(lastTr,"otptNm");
|
|
|
|
|
var el = $P.fnGetElement(lastTr,"otptArtclNm");
|
|
|
|
|
$(el).attr("disabled","disabled");
|
|
|
|
|
$(el).addClass("no-bgi");
|
|
|
|
|
}
|
|
|
|
@ -485,32 +485,32 @@ $(document).ready(function(){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var otptNm = $(selectElement).val();
|
|
|
|
|
var otptArtclNm = $(selectElement).val();
|
|
|
|
|
var tr = $(selectElement).parent().parent()[0];
|
|
|
|
|
var prototypeList = $P.otptStngMap.multiple.prototypeList;
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(tr,"componentType"))
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptNm, "componentType"));
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptArtclNm, "componentType"));
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(tr,"leftPstn"))
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptNm, "leftPstn"));
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptArtclNm, "leftPstn"));
|
|
|
|
|
$($P.fnGetElement(tr,"topPstn"))
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptNm, "topPstn"));
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptArtclNm, "topPstn"));
|
|
|
|
|
$($P.fnGetElement(tr,"widthSz"))
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptNm, "widthSz"));
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptArtclNm, "widthSz"));
|
|
|
|
|
$($P.fnGetElement(tr,"heightSz"))
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptNm, "heightSz"));
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptArtclNm, "heightSz"));
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(tr,"textSort"))
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptNm, "textSort"));
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptArtclNm, "textSort"));
|
|
|
|
|
$($P.fnGetElement(tr,"fontNm"))
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptNm, "fontNm"));
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptArtclNm, "fontNm"));
|
|
|
|
|
$($P.fnGetElement(tr,"fontSz"))
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptNm, "fontSz"));
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptArtclNm, "fontSz"));
|
|
|
|
|
$($P.fnGetElement(tr,"fontColor"))
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptNm, "fontColor"));
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptArtclNm, "fontColor"));
|
|
|
|
|
$($P.fnGetElement(tr,"fontStyle"))
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptNm, "fontStyle"));
|
|
|
|
|
.val($P.fnGetProto(prototypeList, otptArtclNm, "fontStyle"));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -518,7 +518,7 @@ $(document).ready(function(){
|
|
|
|
|
var rowArr = [];
|
|
|
|
|
$("#"+tbodyId+" tr").each(function(){
|
|
|
|
|
var otptFormId = this.dataset.key;
|
|
|
|
|
var otptNm = $($P.fnGetElement(this,"otptNm")).val();
|
|
|
|
|
var otptArtclNm = $($P.fnGetElement(this,"otptArtclNm")).val();
|
|
|
|
|
var leftPstn = $($P.fnGetElement(this,"leftPstn")).val();
|
|
|
|
|
var topPstn = $($P.fnGetElement(this,"topPstn")).val();
|
|
|
|
|
var widthSz = $($P.fnGetElement(this,"widthSz")).val();
|
|
|
|
@ -531,7 +531,7 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
var row = {
|
|
|
|
|
otptFormId : otptFormId,
|
|
|
|
|
otptNm : otptNm,
|
|
|
|
|
otptArtclNm : otptArtclNm,
|
|
|
|
|
leftPstn : leftPstn,
|
|
|
|
|
topPstn : topPstn,
|
|
|
|
|
widthSz : widthSz,
|
|
|
|
@ -562,7 +562,7 @@ $(document).ready(function(){
|
|
|
|
|
var rowArr = [...rowArr1, ...rowArr2];
|
|
|
|
|
|
|
|
|
|
for(var i=0; i<rowArr.length; i++){
|
|
|
|
|
if(rowArr[i].otptNm == ""){
|
|
|
|
|
if(rowArr[i].otptArtclNm == ""){
|
|
|
|
|
alert("출력항목명을 선택하세요.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -636,7 +636,7 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
$("#btnLoad--${pageName}").on("click", () => $P.fnLoad() );
|
|
|
|
|
|
|
|
|
|
$("#btnUniqueAdd--${pageName}").on("click", () => $P.choiceOtptNm() );
|
|
|
|
|
$("#btnUniqueAdd--${pageName}").on("click", () => $P.choiceOtptArtclNm() );
|
|
|
|
|
$("#btnMultipleAdd--${pageName}").on("click", () => $P.addRow() );
|
|
|
|
|
|
|
|
|
|
$("#btnUniqueDel--${pageName}").on("click", () => $P.delRow('tbodyUnique--${pageName}') );
|
|
|
|
|