고지서 출력대상 조회 화면 추가

main
이범준 11 months ago
parent 64c4bbcd8c
commit 413e9df74e

@ -280,6 +280,26 @@ public class Advntce extends PDFFormat {
return result;
}
@Override
public List<String> getMappingValues(String otptArtclNm, String defaultValue, boolean forPost,
DataObject dataObject, PrintOption printOption, PDFPrintUtil pdfPrintUtil) {
List<String> result = new ArrayList<String>();
switch(otptArtclNm) {
case "crdnPhoto" -> {
int i = 1;
while(!dataObject.string("CRDN_PHOTO"+i).equals("")) {
result.add(dataObject.string("CRDN_PHOTO"+i));
i++;
}
}
}
return result;
}
/**
* .
*/
@ -323,23 +343,4 @@ public class Advntce extends PDFFormat {
return dataObject;
}
@Override
public List<String> getMappingValues(String otptArtclNm, String defaultValue, boolean forPost,
DataObject dataObject, PrintOption printOption, PDFPrintUtil pdfPrintUtil) {
List<String> result = new ArrayList<String>();
switch(otptArtclNm) {
case "crdnPhoto" -> {
int i = 1;
while(!dataObject.string("CRDN_PHOTO"+i).equals("")) {
result.add(dataObject.string("CRDN_PHOTO"+i));
i++;
}
}
}
return result;
}
}

@ -0,0 +1,341 @@
package cokr.xit.fims.cmmn.pdf.format;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.FactionUtil;
import cokr.xit.fims.cmmn.pdf.PDFFormat;
import cokr.xit.fims.cmmn.pdf.PDFPrintUtil;
import cokr.xit.fims.sprt.PrintOption;
import cokr.xit.foundation.data.DataFormat;
import cokr.xit.foundation.data.DataObject;
public class Nht extends PDFFormat {
public Nht() {
addForPost(
image("postSenderLogo","우편물송신자로고","").a4(10, 0).letter(10, 0).size(0, 0),
text("postSenderInst","우편물송신자기관","").a4(10, 5).letter(10, 5),
text("postSenderDept","우편물송신자부서","").a4(50, 5).letter(50, 5),
text("postSenderAddr","우편물송신자주소","").a4(10, 15).letter(10, 15),
text("postSenderDtlAddr","우편물송신자상세주소","").a4(10, 25).letter(10, 25),
text("postSenderZip","우편물송신자우편번호","").a4(10, 35).letter(10, 35),
text("postSenderTel","우편물송신자전화번호","").a4(10, 45).letter(10, 45),
text("postSenderFax","우편물송신자팩스번호","").a4(50, 45).letter(50, 45),
text("postReceiverAddr","우편물수신자주소","").a4(100, 40).letter(100, 40).size(90, 0).align("right"),
text("postReceiverDtlAddr","우편물수신자상세주소","").a4(100, 50).letter(100, 50).size(90, 0).align("right"),
text("postReceiver","우편물수신자명","").a4(100, 60).letter(100, 60).size(90, 0).align("right"),
text("postReceiverZip","우편물수신자우편번호","").a4(100, 70).letter(100, 70).size(90, 0).align("right")
);
add(
image("background","배경이미지","").a4(0, 0).letter(0, 0).size(0, 0),
images("crdnPhoto","단속사진","").a4(110, 100).letter(116, 95).size(90, 80),
image("rprsCrdnPhoto","대표단속사진","").a4(10, 200).letter(10, 186).size(80, 80),
text("rtpyrNm","수신자명",""),
text("rtpyrNo","수신자번호",""),
text("rtpyrAddr","수신자주소",""),
text("rtpyrDtlAddr","수신자상세주소",""),
text("rtpyrFullAddr","수신자전체주소",""),
text("vhrno","차량번호",""),
text("crdnYmd","단속일자",""),
text("crdnYmdTm","단속일시",""),
text("crdnPlc","단속장소",""),
text("ffnlgCarmdlNm","차종",""),
text("vltnArtcl","위반내용",""),
text("vltnLawNm","위반법령",""),
text("crdnSn","증거번호",""),
text("ffnlgCrdnAmt","최초금액",""),
text("advntceAmt","사전통지금액",""),
text("advntceDudtYmd","납부기한",""),
text("vrActno","대표가상계좌번호",""),
text("vrActno1","가상계좌번호1",""),
text("vrActno2","가상계좌번호2",""),
text("vrActno3","가상계좌번호3",""),
text("vrActno4","가상계좌번호4",""),
text("vrActno5","가상계좌번호5",""),
text("vrActno6","가상계좌번호6",""),
text("vrActno7","가상계좌번호7",""),
text("vrActno8","가상계좌번호8",""),
text("vrActno9","가상계좌번호9",""),
text("vrActno10","가상계좌번호10",""),
text("epayNo","전자납부번호",""),
text("otptYmd","출력일자",""),
text("otptDt","출력일시",""),
text("otptYYYY","출력년도",""),
text("otptMM","출력월",""),
text("otptDD","출력일",""),
text("offcsText","관인명",""),
image("offcs","관인이미지","").size(20, 20),
text("undefined","(미정)","미정항목")
);
}
/**
* .
*/
@Override
public String getMappingValue(String otptArtclNm, String defaultValue, boolean forPost,
DataObject dataObject, PrintOption printOption, PDFPrintUtil pdfPrintUtil) {
String result = "";
if(forPost) {
return this.getValueForPost(otptArtclNm, defaultValue, dataObject, printOption, pdfPrintUtil);
}
Map<String, String> globalVariable = printOption.getGlobalVariable();
switch(otptArtclNm) {
case "background" -> {
if(globalVariable.get("bcrnImgPath") != null) {
result = globalVariable.get("bcrnImgPath");
}
}
case "rprsCrdnPhoto" -> { //대표사진
result = dataObject.string("CRDN_PHOTO1");
}
case "rtpyrNm" -> {
result = dataObject.string("RTPYR_NM");
}
case "rtpyrNo" -> {
result = dataObject.string("RTPYR_NO");
}
case "rtpyrAddr" -> {
result = dataObject.string("RTPYR_ADDR");
}
case "rtpyrDtlAddr" -> {
result = dataObject.string("RTPYR_DTL_ADDR");
}
case "rtpyrFullAddr" -> {
result = dataObject.string("RTPYR_FULL_ADDR");
}
case "rtpyrZip" -> {
result = dataObject.string("RTPYR_ZIP");
}
case "vhrno" -> {
result = dataObject.string("VHRNO");
}
case "crdnYmd" -> {
result = DataFormat.yyyy_mm_dd(dataObject.string("CRDN_YMD"));
}
case "crdnYmdTm" -> {
result = CmmnUtil.yyyy_mm_dd_hh_mm_ss(dataObject.string("CRDN_YMD_TM"));
}
case "crdnPlc" -> {
result = dataObject.string("CRDN_PLC");
}
case "ffnlgCarmdlNm" -> {
result = dataObject.string("FFNLG_CARMDL_NM");
}
case "vltnArtcl" -> {
result = dataObject.string("VLTN_ARTCL");
}
case "vltnLawNm" -> {
result = dataObject.string("VLTN_LAW_NM");
}
case "crdnSn" -> {
result = dataObject.string("CRDN_SN");
}
case "ffnlgCrdnAmt" -> {
result = dataObject.string("FFNLG_CRDN_AMT");
}
case "advntceAmt" -> {
result = CmmnUtil.addCommaToNumber(dataObject.string("ADVNTCE_AMT"));
}
case "advntceDudtYmd" -> {
result = DataFormat.yyyy_mm_dd(dataObject.string("ADVNTCE_DUDT_YMD"));
}
case "vrActno" -> {
result = dataObject.string("VR_ACTNO");
}
case "vrActno1" -> {
result = dataObject.string("VR_ACTNO1");
}
case "vrActno2" -> {
result = dataObject.string("VR_ACTNO2");
}
case "vrActno3" -> {
result = dataObject.string("VR_ACTNO3");
}
case "vrActno4" -> {
result = dataObject.string("VR_ACTNO4");
}
case "vrActno5" -> {
result = dataObject.string("VR_ACTNO5");
}
case "vrActno6" -> {
result = dataObject.string("VR_ACTNO6");
}
case "vrActno7" -> {
result = dataObject.string("VR_ACTNO7");
}
case "vrActno8" -> {
result = dataObject.string("VR_ACTNO8");
}
case "vrActno9" -> {
result = dataObject.string("VR_ACTNO9");
}
case "vrActno10" -> {
result = dataObject.string("VR_ACTNO10");
}
case "epayNo" -> {
result = dataObject.string("EPAY_NO");
}
case "otptYmd" -> {
result = DataFormat.yyyy_mm_dd(pdfPrintUtil.getPrintRequestDt().substring(0,8));
}
case "otptDt" -> {
result = CmmnUtil.yyyy_mm_dd_hh_mm_ss(pdfPrintUtil.getPrintRequestDt());
}
case "otptYYYY" -> {
result = pdfPrintUtil.getPrintRequestDt().substring(0,4);
}
case "otptMM" -> {
result = pdfPrintUtil.getPrintRequestDt().substring(4,6);
}
case "otptDD" -> {
result = pdfPrintUtil.getPrintRequestDt().substring(6,8);
}
case "offcsText" -> {
String instNm = (String) pdfPrintUtil.getPrintRequestUserInfo().getInfo().get("instNm");
instNm = FactionUtil.getLastWord(instNm);
instNm = FactionUtil.getInstituteLeader(instNm, true);
result = instNm;
}
case "offcs" -> {
result = globalVariable.get("offcsFilePath");
}
case "undefined" -> {
result = defaultValue;
}
}
return result;
}
/**
* .
*/
@Override
public String getValueForPost(String otptArtclNm, String defaultValue,
DataObject dataObject, PrintOption printOption, PDFPrintUtil pdfPrintUtil) {
String result = "";
switch(otptArtclNm) {
case "postReceiverAddr" -> {
result = dataObject.string("RTPYR_ADDR");
}
case "postReceiverDtlAddr" -> {
result = dataObject.string("RTPYR_DTL_ADDR");
}
case "postReceiverZip" -> {
result = dataObject.string("RTPYR_ZIP");
}
case "postReceiver" -> {
result = dataObject.string("RTPYR_NM");
}
case "postSenderLogo" -> {
result = printOption.getGlobalVariable().get("logoFilePath");
}
case "postSenderInst" -> {
result = (String)pdfPrintUtil.getPrintRequestUserInfo().getInfo().get("instNm");
}
case "postSenderDept" -> {
result = (String)pdfPrintUtil.getPrintRequestUserInfo().getInfo().get("deptNm");
}
case "postSenderAddr" -> {
result = printOption.getGlobalVariable().get("instAddr");
}
case "postSenderDtlAddr" -> {
result = printOption.getGlobalVariable().get("instDaddr");
}
case "postSenderZip" -> {
result = printOption.getGlobalVariable().get("instZip");
}
case "postSenderTel" -> {
result = printOption.getGlobalVariable().get("deptTelno");
}
case "postSenderFax" -> {
result = printOption.getGlobalVariable().get("deptFxno");
}
}
return result;
}
@Override
public List<String> getMappingValues(String otptArtclNm, String defaultValue, boolean forPost,
DataObject dataObject, PrintOption printOption, PDFPrintUtil pdfPrintUtil) {
List<String> result = new ArrayList<String>();
switch(otptArtclNm) {
case "crdnPhoto" -> {
int i = 1;
while(!dataObject.string("CRDN_PHOTO"+i).equals("")) {
result.add(dataObject.string("CRDN_PHOTO"+i));
i++;
}
}
}
return result;
}
/**
* .
*/
@Override
public DataObject createSampleData() {
DataObject dataObject = new DataObject();
dataObject.put("RTPYR_NM", "홍길동");
dataObject.put("RTPYR_ADDR", "무슨도 무슨시 무슨구");
dataObject.put("RTPYR_DTL_ADDR", "ㅇㅇ아파트 999호");
dataObject.put("RTPYR_FULL_ADDR", "무슨도 무슨시 무슨구 ㅇㅇ아파트 999호");
dataObject.put("RTPYR_ZIP", "12345");
dataObject.put("VHRNO", "00가0000");
dataObject.put("CRDN_YMD", "20231204");
dataObject.put("CRDN_YMD_TM", "20231204080808");
dataObject.put("CRDN_PLC", "사거리 건너편");
dataObject.put("FFNLG_CARMDL_NM", "승용");
dataObject.put("VLTN_ARTCL", "주차위반");
dataObject.put("VLTN_LAW_NM", "00법 제0조 제0항");
dataObject.put("CRDN_SN", "1234567890");
dataObject.put("VR_ACTNO", "000000-00-000000");
dataObject.put("VR_ACTNO1", "111111-00-000000");
dataObject.put("VR_ACTNO2", "222222-00-000000");
dataObject.put("VR_ACTNO3", "333333-00-000000");
dataObject.put("VR_ACTNO4", "444444-00-000000");
dataObject.put("VR_ACTNO5", "555555-00-000000");
dataObject.put("VR_ACTNO6", "666666-00-000000");
dataObject.put("VR_ACTNO7", "777777-00-000000");
dataObject.put("VR_ACTNO8", "888888-00-000000");
dataObject.put("VR_ACTNO9", "999999-00-000000");
dataObject.put("VR_ACTNO10", "101010-00-000000");
dataObject.put("EPAY_NO", "00000-0-00-00-000000000");
dataObject.put("FFNLG_CRDN_AMT", "100000");
dataObject.put("CRDN_PHOTO1", "samplefiles/crdn1.png");
dataObject.put("CRDN_PHOTO2", "samplefiles/crdn2.png");
dataObject.put("CRDN_PHOTO3", "samplefiles/crdn3.png");
dataObject.put("CRDN_PHOTO4", "samplefiles/crdn4.png");
dataObject.put("CRDN_PHOTO5", "samplefiles/crdn5.png");
dataObject.put("CRDN_PHOTO6", "samplefiles/crdn6.png");
dataObject.put("CRDN_PHOTO7", "samplefiles/crdn7.png");
return dataObject;
}
}

@ -35,6 +35,7 @@ import cokr.xit.fims.cmmn.pdf.PDFFormat;
import cokr.xit.fims.cmmn.pdf.PDFPrintUtil;
import cokr.xit.fims.cmmn.pdf.PstnAndSize;
import cokr.xit.fims.cmmn.pdf.format.Advntce;
import cokr.xit.fims.cmmn.pdf.format.Nht;
import cokr.xit.fims.cmmn.service.bean.FactionBean;
import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.crdn.Crdn;
@ -275,10 +276,14 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
PDFFormat pdfFormat = null;
if(formatName.equals("advntce")) {
pdfFormat = new Advntce();
} else if(formatName.equals("nht")) {
pdfFormat = new Nht();
}
String sndngSeCd = "";
if(formatName.equals("advntce")) {
sndngSeCd = "02";
} else if(formatName.equals("nht")) {
sndngSeCd = "03";
}
String paperSeCd = printOption.getPaperSeCd();

@ -61,6 +61,9 @@ public class Sprt01Controller extends ApplicationController {
printAdvntceMain = "/140/info.do",
makeAdvntcePdf = "/140/makeAdvntcePdf.do",
makeAdvntceOutsourcing = "/140/makeAdvntceOutsourcing.do",
printNhtMain = "/150/info.do",
makeNhtPdf = "/150/makeNhtPdf.do",
makeNhtOutsourcing = "/150/makeNhtOutsourcing.do",
otptStngMain = "/200/main.do",
getOtptStngInfo = "/200/info.do",
@ -423,6 +426,43 @@ public class Sprt01Controller extends ApplicationController {
return mav;
}
/** .
*
* @return /fims/sprt/sprt01150
*/
public ModelAndView printNhtMain(String... crdnIds) {
ModelAndView mav = new ModelAndView("fims/sprt/sprt01150-info");
mav.addObject("pageName", "sprt01150-info");
mav.addObject("crdnIds", toJson(crdnIds));
return mav;
}
/** PDF .
* @return PDF
*/
public ModelAndView makeNhtPdf(PrintOption printOption, String[] crdnIds) {
ModelAndView mav = new ModelAndView("jsonView");
Map<String,String> result = sprt01Service.makePdfFile("info", "nht", printOption, crdnIds);
mav.addAllObjects(result);
return mav;
}
/** txt, .
* @return
*/
public ModelAndView makeNhtOutsourcing(PrintOption printOption, String[] crdnIds) {
ModelAndView mav = new ModelAndView("jsonView");
Map<String,String> result = sprt01Service.makeOutsourcingFile("nht", printOption, crdnIds);
mav.addAllObjects(result);
return mav;
}
/** .
* @return
*/

@ -434,6 +434,24 @@ public class CmnController {
return super.makeAdvntceOutsourcing(printOption, crdnIds);
}
@Override
@RequestMapping(name="고지서 출력 화면", value=METHOD_URL.printNhtMain)
public ModelAndView printNhtMain(String... crdnIds) {
return super.printNhtMain(crdnIds);
}
@Override
@RequestMapping(name="고지서 pdf 파일 생성", value=METHOD_URL.makeNhtPdf)
public ModelAndView makeNhtPdf(PrintOption printOption, String... crdnIds) {
return super.makeNhtPdf(printOption, crdnIds);
}
@Override
@RequestMapping(name="고지서 외주 파일 생성", value=METHOD_URL.makeNhtOutsourcing)
public ModelAndView makeNhtOutsourcing(PrintOption printOption, String... crdnIds) {
return super.makeNhtOutsourcing(printOption, crdnIds);
}
@Override
@RequestMapping(name="출력물 설정 메인 화면", value=METHOD_URL.otptStngMain)
public ModelAndView otptStngMain() {

@ -570,6 +570,61 @@ integrationSearch.fnPrintAdvntce = () => {
}
//고지서
integrationSearch.fnPrintNht = () => {
var upDataset = integrationSearchControl.updataset;
if(upDataset.length <= 0){
dialog.alert("출력할 자료가 없습니다.");
return;
}
var upArr = upDataset.getDataset();
var crdnIds = Object.keys(Object.groupBy(upArr, ({ CRDN_ID }) => CRDN_ID));
var url = wctx.url("/sprt/sprt01/150/info.do");
var dialogId = "printNhtDialog";
ajax.get({
url : url
, data : { crdnIds : crdnIds.join(",") }
, success : resp => {
dialog.open({
id : dialogId
, title : "종합조회-고지서"
, size : "xl"
, content : resp
, init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId);
var found = $("#"+dialogId).find("template")[0].innerHTML;
var trs = upDataset.inStrings(found, null);
$("#"+dialogId).find("tbody").html(trs.join());
var parentRes = new Object();
var childReq = pageObject.childReq.pop();
for(var reqKey in childReq) {
if(integrationSearch.provide[reqKey]){
parentRes[reqKey] = integrationSearch.provide[reqKey];
} else {
parentRes[reqKey] = function(){};
}
}
pageObject.parentRes.push(parentRes);
}
, onClose : () => { }
});
}
});
}
//개별총정보 dialog
integrationSearch.getInfo = (taskSeCd, crdnId) => {
if (crdnId == undefined || crdnId == null || crdnId == "") {
@ -661,6 +716,7 @@ integrationSearch.setEvent = () => {
$("#btnDownPrintRcvmtConfirm--${pageName}").on("click", function(){ integrationSearch.fnPrintRcvmtConfirm(); });
$("#btnUpPrintAdvntce--${pageName}").on("click", function(){ integrationSearch.fnPrintAdvntce(); });
$("#btnPrintNht--${pageName}").on("click", function(){ integrationSearch.fnPrintNht(); });
//$("#btn").on("click", function(){ });

@ -19,8 +19,8 @@
title="단속 내역서/확인서">
단속 내역서/확인서
</button>
<button type="button" id="" class="btn btn-info w-px-120"
title="고지서" onclick="">
<button type="button" id="btnPrintNht--${pageName}" class="btn btn-info w-px-120"
title="고지서">
고지서
</button>
<button type="button" id="btnPrintBill--${pageName}" class="btn btn-info w-px-120"

@ -0,0 +1,206 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="prefixName" scope="request">출력대상-고지서</c:set>
<div class="d-flex flex-row justify-content-evenly">
<div class="card p-3">
<div class="row mb-3 justify-content-start">
<div class="col-md-12">
<div class="float-start">
<button type="button" id="btnPrintNhtPdf01--${pageName}" class="btn btn-info">고지서출력(PDF-A4)</button>
<button type="button" id="btnPrintNhtPdf02--${pageName}" class="btn btn-info">고지서서출력(PDF-Letter)</button>
<button type="button" id="btnPrintNhtOutsourcing--${pageName}" class="btn btn-info">고지서출력(외주파일)</button>
<button type="button" id="btnOpenOtptStng--${pageName}" class="btn btn-primary">설정</button>
</div>
</div>
</div>
<div class="card-datatable text-nowrap mb-3">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive"
style="overflow-x:scroll; height:300px; overflow-y:scroll;" >
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer"
id="table--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead" >
<tr id="theadTr--${pageName}">
<th style="width:120px">시군구명</th>
<th style="width:180px">과태료명</th>
<th style="width:120px">차량번호</th>
<th style="width:120px">대체차량번호</th>
<th style="width:200px">단속일시</th>
<th style="width:200px">단속장소</th>
<th style="width:120px">고지번호</th>
<th style="width:120px">잔액</th>
<th style="width:300px">가상계좌번호</th>
<th style="width:120px">처리상태</th>
<th style="width:120px">성명</th>
<th style="width:400px">주소</th>
<th style="width:400px">번지</th>
</tr>
</thead>
<tbody id="tbody--${pageName}">
</tbody>
<template id="found--${pageName}">
<tr data-key="{CRDN_ID}" onclick="pageObject['${pageName}'].clickGrid(this);">
<td>{SGG_NM}</td>
<td>{TASK_SE_NM}</td>
<td>{VHRNO}</td>
<td>{RPM_SZR_VHRNO}</td>
<td>{CRDN_YMD_TM}</td>
<td>{CRDN_PLC}</td>
<td>{GOJI_NO}</td>
<td>{SUM_AMT}</td>
<td>{VR_ACTNO}</td>
<td>{CRDN_STTS_NM}</td>
<td>{RTPYR_NM}</td>
<td>{RTPYR_ADDR}</td>
<td>{RTPYR_DTL_ADDR}</td>
</tr>
</template>
</table>
</div>
</div>
</div>
<form id="frmEdit--${pageName}">
<input type="text" name="dialogId" hidden />
</form>
<span id="tempArea--${pageName}" hidden></span>
</div>
</div>
<script>
pageObject["${pageName}"] = {};
pageObject["${pageName}"].provided = {};
pageObject.childReq = [];
pageObject.childReq.push({
getInfo : function(){ return null; },
isAllSameTask : function(){ return false; }
});
$(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.crdnIds = ${crdnIds};
if(pageObject.parentRes.length > 0){
$P.provided = pageObject.parentRes.pop();
} else {
$P.provided = pageObject.childReq.pop();
}
//그리드클릭
$P.clickGrid = (element) => {
var key = element.dataset.key;
$("#tbody--${pageName}").setCurrentRow(key);
var info = $P.provided.getInfo(key);
var ff = new FimsFormFields("#frmEdit--${pageName}");
ff.set(info);
}
$P.fnMakeFile = (fileType, paper) => {
if(!customValidate($("#frmEdit--${pageName} input"))) return;
if(!$P.provided.isAllSameTask($P.crdnIds)){
alert("여러 건 출력시 과태료업무가 동일한 자료만 처리 가능합니다.")
return;
}
var sample = $P.crdnIds[0]; //체크된것중첫번째
var taskSeCd = $P.provided.getInfo(sample).TASK_SE_CD;
var url = "";
if(fileType == "pdf"){
url = wctx.url("/sprt/sprt01/150/makeNhtPdf.do");
} else if(fileType == "outsourcing"){
url = wctx.url("/sprt/sprt01/150/makeNhtOutsourcing.do");
}
var formFields = new FimsFormFields("#frmEdit--${pageName}");
var globalVariable = formFields.get();
var submitParam = {
crdnIds : $P.crdnIds.join(","),
taskSeCd : taskSeCd
};
if(fileType == "pdf"){
submitParam.paperSeCd = paper;
}
ajax.post({
url : url,
data : submitParam,
success : (resp) => {
if(resp.filePath != null && resp.filePath != ""){
var a = document.createElement("a");
a.href = resp.filePath;
a.download = resp.fileName;
document.getElementById("tempArea--${pageName}").appendChild(a);
a.click();
document.getElementById("tempArea--${pageName}").removeChild(a);
}
}
});
}
$P.fnOpenOtptStng = () => {
var fix = "";
if($P.provided.isAllSameTask($P.crdnIds)){
var sample = $P.crdnIds[0]; //체크된것중첫번째
fix = $P.provided.getInfo(sample).TASK_SE_CD;
}
var url = wctx.url("/sprt/sprt01/200/main.do");
var dialogId = "otptStngDialog";
ajax.post({
url : url,
data : {},
success : (resp) => {
dialog.open({
id : dialogId
, title : "출력설정"
, size : "xxl"
, content : resp
, init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId);
$("#"+dialogId).find("form[name='frmSearch']").find("[name='sggCd']").val(MY_INFO.info.sggCd);
if(fix != ""){
var taskSeSelectbox = $("#"+dialogId).find("form[name='frmSearch']").find("[name='taskSeCd']");
taskSeSelectbox.val(fix);
taskSeSelectbox.attr("disabled","disabled");
}
}
, onClose : () => { }
});
}
});
}
//버튼이벤트
$("#btnPrintNhtPdf01--${pageName}").on("click", () => $P.fnMakeFile('pdf','01') );
$("#btnPrintNhtPdf02--${pageName}").on("click", () => $P.fnMakeFile('pdf','02') );
$("#btnPrintNhtOutsourcing--${pageName}").on("click", () => $P.fnMakeFile('outsourcing') );
$("#btnOpenOtptStng--${pageName}").on("click", () => $P.fnOpenOtptStng() );
//첫번째 줄 클릭
$("#tbody--${pageName}").find("tr:eq(0)").click();
});
</script>

@ -19,6 +19,7 @@
출력물
<select class="form-select" name="sndngSeCd">
<option value="02">사전통지서</option>
<option value="03">부과고지서</option>
</select>
용지
<select class="form-select" name="paperSeCd">

Loading…
Cancel
Save