|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
|
|
|
|
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
|
|
|
|
|
|
|
|
|
<div class="d-flex flex-row justify-content-evenly">
|
|
|
|
|
|
|
|
|
|
<div class="card" style="max-width:1100px;" title="단속정보">
|
|
|
|
|
<form id="frm--${pageName}" class="dpv eca">
|
|
|
|
|
<input name="crdnId" type="hidden" data-map="CRDN_ID" />
|
|
|
|
@ -150,8 +152,15 @@
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card" style="width:400px;">
|
|
|
|
|
사진
|
|
|
|
|
<form id="frmDummy--${pageName}" class="dpv eca" method="post" enctype="multipart/form-data">
|
|
|
|
|
<input type="file" id="uploadFileList--${pageName}" name="uploadFileList" multiple />
|
|
|
|
|
</form>
|
|
|
|
|
<div id="display--${pageName}">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
@ -161,16 +170,21 @@
|
|
|
|
|
|
|
|
|
|
pageObject["${pageName}"] = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
var $P = pageObject["${pageName}"];
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl
|
|
|
|
|
* DatasetControl, Dataset, FormFields
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.formFields = new FimsFormFields("#frm--${pageName}");
|
|
|
|
|
|
|
|
|
|
$P.uploadSet = uploadSupport("#uploadFileList--${pageName}");
|
|
|
|
|
|
|
|
|
|
$P.crdnControl = new DatasetControl({
|
|
|
|
|
prefix:"crdn", prefixName:"단속", infoSize:"xxl",
|
|
|
|
|
urls : { load : "" },
|
|
|
|
|
urls : { load : "", create : wctx.url("/${taskSeCd}/crdn/crdn05/030/create.do") },
|
|
|
|
|
keymapper:info => info ? info.CRDN_ID : "",
|
|
|
|
|
dataGetter:obj => obj.crdnList,
|
|
|
|
|
appendData:true,
|
|
|
|
@ -178,13 +192,40 @@ $(document).ready(function(){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$P.crdnControl.urls.create = wctx.url("/${taskSeCd}/crdn/crdn05/030/create.do");
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.save = (info) => {
|
|
|
|
|
if (!info) return;
|
|
|
|
|
var item = $P.crdnControl.getCurrent("item"),
|
|
|
|
|
create = "added" == item.state;
|
|
|
|
|
|
|
|
|
|
var formData = new FormData(document.getElementById("frmDummy--${pageName}"));
|
|
|
|
|
for(var key in info) {
|
|
|
|
|
var value = info[key];
|
|
|
|
|
formData.append(key,value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url:!create ? $P.crdnControl.urls.update : $P.crdnControl.urls.create,
|
|
|
|
|
data: formData, contentType : false, processData : false,
|
|
|
|
|
success:resp => $P.crdnControl.onSave(resp)
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl.on, Dataset.on
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.uploadSet.onDatasetChange = () => { $P.uploadSet.onRemove(); };
|
|
|
|
|
$P.uploadSet.onRemove = () => { $P.fnDisplay(); };
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* pageObject.function
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.formFields = new FimsFormFields("#frm--${pageName}");
|
|
|
|
|
|
|
|
|
|
$P.fnDisplay = () => {
|
|
|
|
|
var displayArea = document.querySelector("#display--${pageName}");
|
|
|
|
|
var imgTags = $P.uploadSet.inStrings("<img src='{url}' width='200' height='200' />").join("\n");
|
|
|
|
|
displayArea.innerHTML = imgTags;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$P.fnSave = () => {
|
|
|
|
|
if (!$("#frm--${pageName} input").validInputs()) return;
|
|
|
|
@ -192,7 +233,7 @@ $(document).ready(function(){
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content:"현재 단속 정보를 저장하시겠습니까?",
|
|
|
|
|
onOK:() => {
|
|
|
|
|
pageObject["crdn05030-info"].crdnControl.save($P.formFields.get());
|
|
|
|
|
$P.crdnControl.save($P.formFields.get());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
@ -212,6 +253,7 @@ $(document).ready(function(){
|
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
|
|
|
|
|
$P.crdnControl.dataset.append({});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|