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