|
|
|
@ -37,7 +37,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="d-flex justify-content-between">
|
|
|
|
|
<span id="currentOtpt--${pageName}" class="bg-lighter h3 h-px-30">
|
|
|
|
|
</span>
|
|
|
|
@ -47,17 +47,17 @@
|
|
|
|
|
<input type="hidden" name="sndngSeCd" />
|
|
|
|
|
<input type="hidden" name="paperSeCd" />
|
|
|
|
|
<input type="text" name="dialogId" hidden />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span id="otptGlobalStng--${pageName}">
|
|
|
|
|
</span>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row mb-3 justify-content-start">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<div class="float-start">
|
|
|
|
|
<strong>단일 출력 항목</strong>
|
|
|
|
|
<button type="button" id="btnUniqueAdd--${pageName}"
|
|
|
|
|
<button type="button" id="btnUniqueAdd--${pageName}"
|
|
|
|
|
class="btn btn-info dropdown-toggle" data-bs-toggle="dropdown">추가</button>
|
|
|
|
|
<ul id="dropdownUniqueAdd--${pageName}" class="dropdown-menu oy-scroll mh-px-250">
|
|
|
|
|
</ul>
|
|
|
|
@ -68,8 +68,8 @@
|
|
|
|
|
<div class="card-datatable text-nowrap mb-3">
|
|
|
|
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
|
|
|
|
|
<div id="scrollUnique--${pageName}" class="table-responsive ox-scroll oy-scroll h-px-300">
|
|
|
|
|
<table
|
|
|
|
|
class="table-layout-fixed compress-cell dataTable table table-bordered"
|
|
|
|
|
<table
|
|
|
|
|
class="table-layout-fixed compress-cell dataTable table table-bordered"
|
|
|
|
|
id="tableUnique--${pageName}" aria-describedby="DataTables_Table_0_info">
|
|
|
|
|
<thead class="sticky-thead" id="theadUnique--${pageName}">
|
|
|
|
|
</thead>
|
|
|
|
@ -79,7 +79,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row mb-3 justify-content-start">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<div class="float-start">
|
|
|
|
@ -92,8 +92,8 @@
|
|
|
|
|
<div class="card-datatable text-nowrap mb-3">
|
|
|
|
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
|
|
|
|
|
<div id="scrollMultiple--${pageName}" class="table-responsive ox-scroll oy-scroll h-px-300">
|
|
|
|
|
<table
|
|
|
|
|
class="table-layout-fixed compress-cell dataTable table table-bordered"
|
|
|
|
|
<table
|
|
|
|
|
class="table-layout-fixed compress-cell dataTable table table-bordered"
|
|
|
|
|
id="tableMultiple--${pageName}" aria-describedby="DataTables_Table_0_info">
|
|
|
|
|
<thead class="sticky-thead" id="theadMultiple--${pageName}">
|
|
|
|
|
</thead>
|
|
|
|
@ -103,7 +103,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -131,7 +131,7 @@
|
|
|
|
|
|
|
|
|
|
<template id="found--${pageName}">
|
|
|
|
|
<tr data-key="{OTPT_FORM_ID}">
|
|
|
|
|
<td data-col="otptArtclOrdr" class="text-center">
|
|
|
|
|
<td data-col="otptArtclSeq" class="text-center">
|
|
|
|
|
<button type="button">▲</button>
|
|
|
|
|
<input type="text" readonly class="w-px-50 text-center" />
|
|
|
|
|
<button type="button">▼</button>
|
|
|
|
@ -186,7 +186,7 @@
|
|
|
|
|
<td data-col="fontSz" class="text-center">
|
|
|
|
|
<input type="number" class="form-control w-px-60" min="8" max="25" />
|
|
|
|
|
</td>
|
|
|
|
|
<td data-col="fontColor" class="text-center">
|
|
|
|
|
<td data-col="fontColr" class="text-center">
|
|
|
|
|
<select class="form-select no-bgi w-automin">
|
|
|
|
|
<option title="검정" value="BLACK"></option>
|
|
|
|
|
<option title="빨강" value="RED"></option>
|
|
|
|
@ -265,7 +265,7 @@ $(document).ready(function(){
|
|
|
|
|
var $P = pageObject["${pageName}"];
|
|
|
|
|
$P.otptGlobalStng = {};
|
|
|
|
|
$P.otptArtclStngMap = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnSave--${pageName}").attr("disabled","disabled");
|
|
|
|
|
$("#btnUniqueAdd--${pageName}").attr("disabled","disabled");
|
|
|
|
|
$("#btnUniqueDel--${pageName}").attr("disabled","disabled");
|
|
|
|
@ -273,7 +273,7 @@ $(document).ready(function(){
|
|
|
|
|
$("#btnMultipleDel--${pageName}").attr("disabled","disabled");
|
|
|
|
|
|
|
|
|
|
$P.fnLoad = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var formFields = new FimsFormFields("#frmSearch--${pageName}");
|
|
|
|
|
var query = formFields.get();
|
|
|
|
|
ajax.post({
|
|
|
|
@ -289,12 +289,12 @@ $(document).ready(function(){
|
|
|
|
|
$("#otptGlobalStng--${pageName}").html("");
|
|
|
|
|
$("#tbodyUnique--${pageName}").html("");
|
|
|
|
|
$("#tbodyMultiple--${pageName}").html("");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#frmEdit--${pageName}").find("[name='sggCd']").val(query.sggCd);
|
|
|
|
|
$("#frmEdit--${pageName}").find("[name='taskSeCd']").val(query.taskSeCd);
|
|
|
|
|
$("#frmEdit--${pageName}").find("[name='sndngSeCd']").val(query.sndngSeCd);
|
|
|
|
|
$("#frmEdit--${pageName}").find("[name='paperSeCd']").val(query.paperSeCd);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#currentOtpt--${pageName}").text(resp.otptStngTitle);
|
|
|
|
|
if(resp.otptGlobalStng != null){
|
|
|
|
|
$P.otptGlobalStng = resp.otptGlobalStng;
|
|
|
|
@ -310,27 +310,27 @@ $(document).ready(function(){
|
|
|
|
|
$P.otptArtclStngMap = resp.otptArtclStngMap;
|
|
|
|
|
|
|
|
|
|
$P.renderOtptGlobalStng($P.otptGlobalStng);
|
|
|
|
|
|
|
|
|
|
$P.renderOtptArtclStngGrid("tbodyUnique--${pageName}",
|
|
|
|
|
$P.otptArtclStngMap.unique.prototypeList,
|
|
|
|
|
|
|
|
|
|
$P.renderOtptArtclStngGrid("tbodyUnique--${pageName}",
|
|
|
|
|
$P.otptArtclStngMap.unique.prototypeList,
|
|
|
|
|
$P.otptArtclStngMap.unique.dataList);
|
|
|
|
|
$P.renderOtptArtclStngGrid("tbodyMultiple--${pageName}",
|
|
|
|
|
$P.otptArtclStngMap.multiple.prototypeList,
|
|
|
|
|
$P.renderOtptArtclStngGrid("tbodyMultiple--${pageName}",
|
|
|
|
|
$P.otptArtclStngMap.multiple.prototypeList,
|
|
|
|
|
$P.otptArtclStngMap.multiple.dataList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//출력 전역 설정 렌더링
|
|
|
|
|
$P.renderOtptGlobalStng = (otptGlobalStng) => {
|
|
|
|
|
var paperSeCd = $("#frmEdit--${pageName}").find("[name='paperSeCd']").val();
|
|
|
|
|
var editForm = $("#frmEdit--${pageName}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//설정ID
|
|
|
|
|
$("#otptGlobalStng--${pageName}").append("<input type='hidden' name='otptBscId' />");
|
|
|
|
|
editForm.find("input[name='otptBscId']").val(otptGlobalStng.OTPT_BSC_ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//접는선 위치
|
|
|
|
|
$("#otptGlobalStng--${pageName}").append(document.getElementById("foldLinePstnTemplate--${pageName}").innerHTML);
|
|
|
|
|
if(paperSeCd == "02"){
|
|
|
|
@ -342,7 +342,7 @@ $(document).ready(function(){
|
|
|
|
|
editForm.find(":radio[name='foldLinePstnSeCd']")
|
|
|
|
|
.filter("[value='"+otptGlobalStng.FOLD_LINE_PSTN_SE_CD+"']")
|
|
|
|
|
.prop("checked", true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//배경이미지
|
|
|
|
|
$("#otptGlobalStng--${pageName}").append(document.getElementById("bcrnTemplate--${pageName}").innerHTML);
|
|
|
|
|
if(otptGlobalStng.BCRN_IMG_PATH == null || otptGlobalStng.BCRN_IMG_PATH == ""){
|
|
|
|
@ -354,7 +354,7 @@ $(document).ready(function(){
|
|
|
|
|
$("#fileStatus--${pageName}").attr("title",otptGlobalStng.BCRN_IMG_FILE_NM);
|
|
|
|
|
$("#btnBgDown--${pageName}").removeAttr("hidden");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//출력 사진 건 수
|
|
|
|
|
$("#otptGlobalStng--${pageName}").append(document.getElementById("photoCntTemplate--${pageName}").innerHTML);
|
|
|
|
|
if(otptGlobalStng.OTPT_PHOTO_CNT == null || otptGlobalStng.OTPT_PHOTO_CNT == ""){
|
|
|
|
@ -362,34 +362,34 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
editForm.find("input[name='otptPhotoCnt']").val(otptGlobalStng.OTPT_PHOTO_CNT);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//출력 요소 그리드 렌더링
|
|
|
|
|
$P.renderOtptArtclStngGrid = (tbodyId, prototypeList, dataList) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var components = "<option value='' data-component-type=''>선택</option>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(var i=0; i < prototypeList.length; i++){
|
|
|
|
|
var p = prototypeList[i];
|
|
|
|
|
components += "<option value='"+p.artclNm+"' >"+p.artclDscrp+"</option>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(var i=0; i < dataList.length; i++){
|
|
|
|
|
var data = dataList[i];
|
|
|
|
|
var found = document.getElementById("found--${pageName}").innerHTML;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
found = found.replace(/{OTPT_FORM_ID}/gi, data.OTPT_FORM_ID);
|
|
|
|
|
found = found.replace(/{COMPONENTS}/gi, components);
|
|
|
|
|
$("#"+tbodyId).append(found);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var lastTr = $("#"+tbodyId).find("tr").last()[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontNm"));
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontColor"));
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontColr"));
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontStyle"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$($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_ARTCL_NM, "leftPstn"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"topPstn"))
|
|
|
|
@ -398,7 +398,7 @@ $(document).ready(function(){
|
|
|
|
|
.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_ARTCL_NM, "heightSz"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"textSort"))
|
|
|
|
|
.set(!isEmpty(data.TEXT_SORT) ? data.TEXT_SORT : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "textSort"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"lineChgYn"))
|
|
|
|
@ -407,42 +407,42 @@ $(document).ready(function(){
|
|
|
|
|
.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_ARTCL_NM, "fontSz"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontColor"))
|
|
|
|
|
.set(!isEmpty(data.FONT_COLOR) ? data.FONT_COLOR : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "fontColor"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontColr"))
|
|
|
|
|
.set(!isEmpty(data.FONT_COLR) ? data.FONT_COLR : $P.fnGetProto(prototypeList, data.OTPT_ARTCL_NM, "fontColr"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"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}"){
|
|
|
|
|
if(tbodyId == "tbodyUnique--${pageName}"){
|
|
|
|
|
var el = $P.fnGetElement(this,"otptArtclNm");
|
|
|
|
|
$(el).attr("disabled","disabled");
|
|
|
|
|
$(el).addClass("no-bgi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var sel = $P.fnGetElement(this,"textSort");
|
|
|
|
|
var toPrev = $(sel).siblings()[0];
|
|
|
|
|
var toNext = $(sel).siblings()[1];
|
|
|
|
|
fnMakeSpinnerSelect(sel, toPrev, toNext);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var scrollDiv = "";
|
|
|
|
|
if(tbodyId == "tbodyUnique--${pageName}"){
|
|
|
|
|
scrollDiv = "scrollUnique--${pageName}";
|
|
|
|
|
} else {
|
|
|
|
|
scrollDiv = "scrollMultiple--${pageName}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var rowSpinButtons = $(this).find("td[data-col='otptArtclOrdr']").find("button");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var rowSpinButtons = $(this).find("td[data-col='otptArtclSeq']").find("button");
|
|
|
|
|
|
|
|
|
|
fnMakeRowSpinner(this,rowSpinButtons[0],rowSpinButtons[1],document.getElementById(scrollDiv), $P.validForBackground);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnGetElement = (tableRow, colName) => {
|
|
|
|
|
return $(tableRow).find("td[data-col='"+colName+"']").children("input, select").first()[0];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnGetProto = (prototypeList, otptArtclNm, stngItemAttrNm) => {
|
|
|
|
|
if(stngItemAttrNm == "leftPstn" || stngItemAttrNm == "topPstn"){
|
|
|
|
|
var paperSeCd = $("#frmEdit--${pageName}").find("[name='paperSeCd']").val();
|
|
|
|
@ -466,23 +466,23 @@ $(document).ready(function(){
|
|
|
|
|
return prototypeList.find((item) => item.artclNm == otptArtclNm)[stngItemAttrNm];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//출력 요소 선택
|
|
|
|
|
$P.choiceOtptArtclNm = () => {
|
|
|
|
|
$("#dropdownUniqueAdd--${pageName}").html("");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var prototypeList = $P.otptArtclStngMap.unique.prototypeList;
|
|
|
|
|
var existArr = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#tbodyUnique--${pageName} tr").each(function(){
|
|
|
|
|
var el = $P.fnGetElement(this,"otptArtclNm");
|
|
|
|
|
existArr.push($(el).val());
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var selectableArr = prototypeList.filter(item => existArr.indexOf(item.artclNm) == -1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var template = document.getElementById("dropdownTemplate--${pageName}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(selectableArr.length < 1){
|
|
|
|
|
var li = template.innerHTML;
|
|
|
|
|
li = li.replace(/{onclick}/gi, "");
|
|
|
|
@ -497,13 +497,13 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//행 추가
|
|
|
|
|
$P.addRow = (otptArtclNm) => {
|
|
|
|
|
var paperSeCd = $("#frmEdit--${pageName}").find("[name='paperSeCd']").val();
|
|
|
|
|
var prototypeList;
|
|
|
|
|
var tbodyId;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(otptArtclNm == null || otptArtclNm == ""){
|
|
|
|
|
prototypeList = $P.otptArtclStngMap.multiple.prototypeList;
|
|
|
|
|
tbodyId = "tbodyMultiple--${pageName}";
|
|
|
|
@ -521,29 +521,29 @@ $(document).ready(function(){
|
|
|
|
|
template = template.replace(/{OTPT_FORM_ID}/gi, "");
|
|
|
|
|
template = template.replace(/{COMPONENTS}/gi, components);
|
|
|
|
|
$("#"+tbodyId).append(template);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var lastTr = $("#"+tbodyId).find("tr").last()[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontNm"));
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontColor"));
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontColr"));
|
|
|
|
|
fnMakeOptionStyleSelect($P.fnGetElement(lastTr,"fontStyle"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var scrollDiv = "";
|
|
|
|
|
if(tbodyId == "tbodyUnique--${pageName}"){
|
|
|
|
|
scrollDiv = "scrollUnique--${pageName}";
|
|
|
|
|
} else {
|
|
|
|
|
scrollDiv = "scrollMultiple--${pageName}";
|
|
|
|
|
}
|
|
|
|
|
var rowSpinButtons = $(lastTr).find("td[data-col='otptArtclOrdr']").find("button");
|
|
|
|
|
var rowSpinButtons = $(lastTr).find("td[data-col='otptArtclSeq']").find("button");
|
|
|
|
|
fnMakeRowSpinner(lastTr,rowSpinButtons[0],rowSpinButtons[1],document.getElementById(scrollDiv), $P.validForBackground);
|
|
|
|
|
|
|
|
|
|
if(otptArtclNm != null && otptArtclNm != ""){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(otptArtclNm != null && otptArtclNm != ""){
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"otptArtclNm")).set(otptArtclNm);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"componentType"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "componentType"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"leftPstn"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "leftPstn"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"topPstn"))
|
|
|
|
@ -552,7 +552,7 @@ $(document).ready(function(){
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "widthSz"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"heightSz"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "heightSz"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(lastTr,"textSort"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "textSort"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"lineChgYn"))
|
|
|
|
@ -561,71 +561,71 @@ $(document).ready(function(){
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontNm"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontSz"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontSz"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontColor"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontColor"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontColr"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontColr"));
|
|
|
|
|
$($P.fnGetElement(lastTr,"fontStyle"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontStyle"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(tbodyId == "tbodyUnique--${pageName}"){
|
|
|
|
|
var el = $P.fnGetElement(lastTr,"otptArtclNm");
|
|
|
|
|
$(el).attr("disabled","disabled");
|
|
|
|
|
$(el).addClass("no-bgi");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//셀렉트 스피너
|
|
|
|
|
var sel = $P.fnGetElement(lastTr,"textSort");
|
|
|
|
|
var toPrev = $(sel).siblings()[0];
|
|
|
|
|
var toNext = $(sel).siblings()[1];
|
|
|
|
|
fnMakeSpinnerSelect(sel, toPrev, toNext);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(tbodyId == "tbodyUnique--${pageName}"){
|
|
|
|
|
$("#scrollUnique--${pageName}").scrollTop($("#scrollUnique--${pageName}")[0].scrollHeight);
|
|
|
|
|
} else {
|
|
|
|
|
$("#scrollMultiple--${pageName}").scrollTop($("#scrollMultiple--${pageName}")[0].scrollHeight);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(otptArtclNm == "background"){ //배경이미지 순서 보정
|
|
|
|
|
if($("#tbodyUnique--${pageName}").find("tr").length >= 2){
|
|
|
|
|
$("#tbodyUnique--${pageName}").find("tr").eq(0).before(lastTr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//행 삭제
|
|
|
|
|
$P.delRow = (tbodyId) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($("#"+tbodyId).find("tr").length <= 0){
|
|
|
|
|
alert('삭제할 항목이 없습니다.');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($("#"+tbodyId).find("input[name='del'][type='checkbox']:checked").length <= 0){
|
|
|
|
|
alert('체크된 항목이 없습니다.');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#"+tbodyId).find("tr").filter(function(index, selector){
|
|
|
|
|
if($(selector).find("input[name='del'][type='checkbox']").is(":checked")){
|
|
|
|
|
$(selector).remove();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//출력 요소 변경
|
|
|
|
|
$P.fnChangeComponent = (selectElement) => {
|
|
|
|
|
if($("#tbodyMultiple--${pageName}").find(selectElement).length <= 0){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var otptArtclNm = $(selectElement).val();
|
|
|
|
|
var tr = $(selectElement).parent().parent()[0];
|
|
|
|
|
var prototypeList = $P.otptArtclStngMap.multiple.prototypeList;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(tr,"componentType"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "componentType"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(tr,"leftPstn"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "leftPstn"));
|
|
|
|
|
$($P.fnGetElement(tr,"topPstn"))
|
|
|
|
@ -634,23 +634,23 @@ $(document).ready(function(){
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "widthSz"));
|
|
|
|
|
$($P.fnGetElement(tr,"heightSz"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "heightSz"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(tr,"textSort"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "textSort"));
|
|
|
|
|
$($P.fnGetElement(tr,"lineChgYn"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "lineChgYn"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$($P.fnGetElement(tr,"fontNm"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontNm"));
|
|
|
|
|
$($P.fnGetElement(tr,"fontSz"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontSz"));
|
|
|
|
|
$($P.fnGetElement(tr,"fontColor"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontColor"));
|
|
|
|
|
$($P.fnGetElement(tr,"fontColr"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontColr"));
|
|
|
|
|
$($P.fnGetElement(tr,"fontStyle"))
|
|
|
|
|
.set($P.fnGetProto(prototypeList, otptArtclNm, "fontStyle"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//출력 요소 설정 값 추출
|
|
|
|
|
$P.getRowData = (tbodyId, formData) => {
|
|
|
|
|
var rowArr = [];
|
|
|
|
@ -663,39 +663,39 @@ $(document).ready(function(){
|
|
|
|
|
row.topPstn = $($P.fnGetElement(this,"topPstn")).val();
|
|
|
|
|
row.widthSz = $($P.fnGetElement(this,"widthSz")).val();
|
|
|
|
|
row.heightSz = $($P.fnGetElement(this,"heightSz")).val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
row.textSort = $($P.fnGetElement(this,"textSort")).val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var lineChgYnEl = $P.fnGetElement(this,"lineChgYn");
|
|
|
|
|
if($(lineChgYnEl).is(":checked")){
|
|
|
|
|
row.lineChgYn = "Y";
|
|
|
|
|
} else {
|
|
|
|
|
row.lineChgYn = "N";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
row.fontNm = $($P.fnGetElement(this,"fontNm")).val();
|
|
|
|
|
row.fontSz = $($P.fnGetElement(this,"fontSz")).val();
|
|
|
|
|
row.fontColor = $($P.fnGetElement(this,"fontColor")).val();
|
|
|
|
|
row.fontColr = $($P.fnGetElement(this,"fontColr")).val();
|
|
|
|
|
row.fontStyle = $($P.fnGetElement(this,"fontStyle")).val();
|
|
|
|
|
row.otptArtclOrdr = $($P.fnGetElement(this,"otptArtclOrdr")).val();
|
|
|
|
|
row.otptArtclSeq = $($P.fnGetElement(this,"otptArtclSeq")).val();
|
|
|
|
|
|
|
|
|
|
row.sggCd = formData.get("sggCd");
|
|
|
|
|
row.taskSeCd = formData.get("taskSeCd");
|
|
|
|
|
row.sndngSeCd = formData.get("sndngSeCd");
|
|
|
|
|
row.paperSeCd = formData.get("paperSeCd");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rowArr.push(row);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return rowArr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//출력 설정 저장
|
|
|
|
|
$P.fnSave = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//출력물 전역설정
|
|
|
|
|
var formData = new FormData(document.getElementById("frmEdit--${pageName}"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//출력 요소 설정
|
|
|
|
|
var rowArr1 = $P.getRowData("tbodyUnique--${pageName}", formData);
|
|
|
|
|
var rowArr2 = $P.getRowData("tbodyMultiple--${pageName}", formData);
|
|
|
|
@ -706,13 +706,13 @@ $(document).ready(function(){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var otptArtclStngList = fnJsonArrayToFormData(rowArr,"otptArtclStngList");
|
|
|
|
|
var keys = Object.keys(otptArtclStngList);
|
|
|
|
|
for(var i=0; i < keys.length; i++){
|
|
|
|
|
formData.append(keys[i], otptArtclStngList[keys[i]]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url : wctx.url("/stng/stng01/010/save.do"),
|
|
|
|
|
data : formData,
|
|
|
|
@ -728,9 +728,9 @@ $(document).ready(function(){
|
|
|
|
|
$("#frmSearch--${pageName}").find("[name='taskSeCd']").val(formFields.taskSeCd);
|
|
|
|
|
$("#frmSearch--${pageName}").find("[name='sndngSeCd']").val(formFields.sndngSeCd);
|
|
|
|
|
$("#frmSearch--${pageName}").find("[name='paperSeCd']").val(formFields.paperSeCd);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnLoad--${pageName}").click();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($("#viewSample--${pageName}").is(":checked")){
|
|
|
|
|
$P.fnMakeSampleFile();
|
|
|
|
|
}
|
|
|
|
@ -738,14 +738,14 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//샘플파일 생성
|
|
|
|
|
$P.fnMakeSampleFile = () => {
|
|
|
|
|
|
|
|
|
|
var formFields = new FimsFormFields("#frmEdit--${pageName}");
|
|
|
|
|
var submitParam = formFields.get();
|
|
|
|
|
submitParam.crdnIds = "sample";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var url = "";
|
|
|
|
|
if(submitParam.sndngSeCd == "02"){
|
|
|
|
|
url = wctx.url("/sprt/sprt01/140/makeAdvntcePdf.do");
|
|
|
|
@ -756,10 +756,10 @@ $(document).ready(function(){
|
|
|
|
|
if(url == ""){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var parameter = toQuery(submitParam);
|
|
|
|
|
var filenameInHeader = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fetch(url + "?" + parameter)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
var header = response.headers.get('Content-Disposition');
|
|
|
|
@ -774,7 +774,7 @@ $(document).ready(function(){
|
|
|
|
|
});
|
|
|
|
|
new Error("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var parts = header.split(';');
|
|
|
|
|
filenameInHeader = decodeURIComponent(parts[1].split('=')[1]);
|
|
|
|
|
return response.blob();
|
|
|
|
@ -783,9 +783,9 @@ $(document).ready(function(){
|
|
|
|
|
openPDF(blob, "pdf_sample");
|
|
|
|
|
})
|
|
|
|
|
.catch(()=>{});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//배경이미지 출력 순서 고정
|
|
|
|
|
$P.validForBackground = (eventInfo) => {
|
|
|
|
|
if(eventInfo.clickedButtonType == "up"){
|
|
|
|
@ -800,10 +800,10 @@ $(document).ready(function(){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnBgDown = () => {
|
|
|
|
|
var a = document.createElement("a");
|
|
|
|
|
a.href = $P.otptGlobalStng.BCRN_IMG_PATH;
|
|
|
|
@ -812,7 +812,7 @@ $(document).ready(function(){
|
|
|
|
|
a.click();
|
|
|
|
|
document.getElementById("tempArea--${pageName}").removeChild(a);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.fnBgUpload = (fileElement) => {
|
|
|
|
|
if(fileElement.files == null || fileElement.files.length == 0){
|
|
|
|
|
if($P.otptGlobalStng.BCRN_IMG_PATH == null || $P.otptGlobalStng.BCRN_IMG_PATH == ""){
|
|
|
|
@ -830,27 +830,27 @@ $(document).ready(function(){
|
|
|
|
|
$("#btnBgDown--${pageName}").attr("hidden","hidden");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#theadUnique--${pageName}").html($("#theadTr--${pageName}")[0].innerHTML);
|
|
|
|
|
$("#theadMultiple--${pageName}").html($("#theadTr--${pageName}")[0].innerHTML);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnLoad--${pageName}").on("click", () => $P.fnLoad() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnUniqueAdd--${pageName}").on("click", () => $P.choiceOtptArtclNm() );
|
|
|
|
|
$("#btnMultipleAdd--${pageName}").on("click", () => $P.addRow() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnUniqueDel--${pageName}").on("click", () => $P.delRow('tbodyUnique--${pageName}') );
|
|
|
|
|
$("#btnMultipleDel--${pageName}").on("click", () => $P.delRow('tbodyMultiple--${pageName}') );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave() );
|
|
|
|
|
|
|
|
|
|
var markerFinder = function(tr){
|
|
|
|
|
return $P.fnGetElement(tr,"otptArtclOrdr");
|
|
|
|
|
return $P.fnGetElement(tr,"otptArtclSeq");
|
|
|
|
|
};
|
|
|
|
|
var markerSetter = function(marker, value){
|
|
|
|
|
marker.value = value;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fnMakeRowNumberingTable(document.getElementById('tbodyUnique--${pageName}'), markerFinder, markerSetter);
|
|
|
|
|
fnMakeRowNumberingTable(document.getElementById('tbodyMultiple--${pageName}'), markerFinder, markerSetter);
|
|
|
|
|
|
|
|
|
|