|
|
@ -51,12 +51,12 @@
|
|
|
|
<input type="text" class="form-control w-45 form-date" id="hdrDe--${pageName}" name="hdrDe" data-fmt-type="day" data-map="hdrDe" autocomplete="off" title="종료 날짜 선택" />
|
|
|
|
<input type="text" class="form-control w-45 form-date" id="hdrDe--${pageName}" name="hdrDe" data-fmt-type="day" data-map="hdrDe" autocomplete="off" title="종료 날짜 선택" />
|
|
|
|
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
|
|
|
|
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="col-md-8">
|
|
|
|
<label for="dsuseDe--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기일자</label>
|
|
|
|
<label for="dsuseDe--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기일자</label>
|
|
|
|
<input type="text" class="form-control w-45 form-date" id="dsuseDe--${pageName}" name="dsuseDe" data-fmt-type="day" data-map="dsuseDe" autocomplete="off" title="종료 날짜 선택" />
|
|
|
|
<input type="text" class="form-control w-px-130 form-date" id="dsuseDe--${pageName}" name="dsuseDe" data-fmt-type="day" data-map="dsuseDe" autocomplete="off" title="종료 날짜 선택" />
|
|
|
|
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
|
|
|
|
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
|
|
|
|
|
|
|
|
<span style="padding-left: 10px; font-weight: bold; color: red; align-items: center" id="spnDsuseDe">폐기일자는 등록후 변경이 불가 합니다</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4"></div>
|
|
|
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="col-md-4">
|
|
|
|
<label for="dsuseSeCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기구분</label>
|
|
|
|
<label for="dsuseSeCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기구분</label>
|
|
|
|
<select class="form-select" id="dsuseSeCd--${pageName}" name="dsuseSeCd">
|
|
|
|
<select class="form-select" id="dsuseSeCd--${pageName}" name="dsuseSeCd">
|
|
|
@ -65,13 +65,14 @@
|
|
|
|
</c:forEach>
|
|
|
|
</c:forEach>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="col-md-8">
|
|
|
|
<label for="dsuseMthCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기방법</label>
|
|
|
|
<label for="dsuseMthCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기방법</label>
|
|
|
|
<select class="form-select" id="dsuseMthCd--${pageName}" name="dsuseMthCd">
|
|
|
|
<select class="form-select" id="dsuseMthCd--${pageName}" name="dsuseMthCd">
|
|
|
|
<c:forEach items="${ADDS05}" var="item">
|
|
|
|
<c:forEach items="${ADDS05}" var="item">
|
|
|
|
<option value="${item.code}">${item.value}</option>
|
|
|
|
<option value="${item.code}">${item.value}</option>
|
|
|
|
</c:forEach>
|
|
|
|
</c:forEach>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<span style="padding-left: 10px; font-weight: bold; color: red; align-items: center" id="spnDsuseMthCd">폐기방법은 등록후 변경이 불가 합니다</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-8">
|
|
|
|
<div class="col-md-8">
|
|
|
|
<label for="dsuseLoc--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기장소</label>
|
|
|
|
<label for="dsuseLoc--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">폐기장소</label>
|
|
|
@ -80,8 +81,8 @@
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<span class="d-inline-flex">
|
|
|
|
<span class="d-inline-flex">
|
|
|
|
<label for="dsuseImg--${pageName}" class="w-px-130 h-px-30 bg-lighter pe-2 col-form-label text-sm-end">폐기(진행) 사진</label>
|
|
|
|
<label for="dsuseImg--${pageName}" class="w-px-130 h-px-30 bg-lighter pe-2 col-form-label text-sm-end">폐기(진행) 사진</label>
|
|
|
|
<button type="button" class="btn btn-primary mx-1" id="btnImgAdd" onclick="$('#inputUploadSet--${pageName}').trigger('click');">추가</button>
|
|
|
|
<button type="button" class="btn btn-primary mx-1" id="btnImgAdd--${pageName}" onclick="$('#inputUploadSet--${pageName}').trigger('click');">추가</button>
|
|
|
|
<button type="button" class="btn btn-primary mx-1" id="btnImageDel--${pageName}" hidden>삭제</button>
|
|
|
|
<button type="button" class="btn btn-primary mx-1" id="btnImgDel--${pageName}" hidden>삭제</button>
|
|
|
|
<span style="padding-left: 10px; font-weight: bold; color: #696cff; align-items: center" id="rsltImgList"></span>
|
|
|
|
<span style="padding-left: 10px; font-weight: bold; color: #696cff; align-items: center" id="rsltImgList"></span>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -137,23 +138,29 @@
|
|
|
|
* script 진입
|
|
|
|
* script 진입
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
|
$(document).ready(function() {
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
// 최초(load) 여부
|
|
|
|
let initDataset = false;
|
|
|
|
let initDataset = false;
|
|
|
|
|
|
|
|
// 변경 화면
|
|
|
|
|
|
|
|
let isEditData = false;
|
|
|
|
|
|
|
|
|
|
|
|
const searchRsltImgList = () => {
|
|
|
|
const searchRsltImgList = () => {
|
|
|
|
alert('ddd');
|
|
|
|
document.getElementById("rsltImgList").innerHTML = "";
|
|
|
|
return;
|
|
|
|
$('#btnImgAdd--${pageName}').prop('disabled', false);
|
|
|
|
|
|
|
|
$('#btnImgDel--${pageName}').prop('disabled', false);
|
|
|
|
|
|
|
|
|
|
|
|
let param = {
|
|
|
|
let param = {
|
|
|
|
dscdmngId: $("#dscdmngId--${pageName}").val(),
|
|
|
|
dscdmngId: $("#dscdmngId--${pageName}").val(),
|
|
|
|
dsuseDe: $("#dsuseDe--${pageName}").val(),
|
|
|
|
dsuseDe: $("#dsuseDe--${pageName}").val().replace(/-/g, ""),
|
|
|
|
dsuseMthCd: $("#dsuseMthCd--${pageName}").val(),
|
|
|
|
dsuseMthCd: $("#dsuseMthCd--${pageName}").val(),
|
|
|
|
deptCd: "${currentUser.deptCode}"
|
|
|
|
deptCd: "${currentUser.deptCode}"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url :wctx.url("/adds/nims/getDsuseMgtRsltImgList.do")
|
|
|
|
url :wctx.url("/adds/nims/getDsuseMgtRsltImgDscdmngList.do")
|
|
|
|
,type:"post"
|
|
|
|
,type: "get"
|
|
|
|
,data:{ dtls : JSON.stringify(dtls) }
|
|
|
|
,data: param
|
|
|
|
,dataType:"json"
|
|
|
|
,dataType:"json"
|
|
|
|
,success:function(jsonStr){
|
|
|
|
,success:function(jsonStr){
|
|
|
|
|
|
|
|
fnRsltImgList(jsonStr);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -166,7 +173,8 @@
|
|
|
|
let isSelf = list.filter(item => item.SEL_YN == 'Y')
|
|
|
|
let isSelf = list.filter(item => item.SEL_YN == 'Y')
|
|
|
|
if(isSelf.length > 0) return;
|
|
|
|
if(isSelf.length > 0) return;
|
|
|
|
|
|
|
|
|
|
|
|
$('#btnImgAdd').prop('disabled', true);
|
|
|
|
$('#btnImgAdd--${pageName}').prop('disabled', true);
|
|
|
|
|
|
|
|
$('#btnImgDel--${pageName}').prop('disabled', true);
|
|
|
|
let tagsTextArr = [];
|
|
|
|
let tagsTextArr = [];
|
|
|
|
|
|
|
|
|
|
|
|
for(let idx = 0; idx < list.length; idx++){
|
|
|
|
for(let idx = 0; idx < list.length; idx++){
|
|
|
@ -223,19 +231,16 @@
|
|
|
|
$P.control.onCurrentChange = item => {
|
|
|
|
$P.control.onCurrentChange = item => {
|
|
|
|
if (!item) return;
|
|
|
|
if (!item) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!initDataset && item.data.dsuseDe){
|
|
|
|
//$("#dsuseDe--${pageName}, #dsuseMthCd--${pageName}").on("change", () => {
|
|
|
|
isEditData = true;
|
|
|
|
alert("item : "+item.data.dsuseDe)
|
|
|
|
$('#dsuseDe--${pageName}').prop('disabled', true);
|
|
|
|
alert($("#dsuseDe--${pageName}").val())
|
|
|
|
$('#dsuseMthCd--${pageName}').prop('disabled', true);
|
|
|
|
//});
|
|
|
|
$('#spnDsuseDe').hide();
|
|
|
|
|
|
|
|
$('#spnDsuseMthCd').hide();
|
|
|
|
|
|
|
|
}
|
|
|
|
// Dataset 셋팅
|
|
|
|
// Dataset 셋팅
|
|
|
|
$P.formFields.set($P.control, item);
|
|
|
|
$P.formFields.set($P.control, item);
|
|
|
|
|
|
|
|
|
|
|
|
alert("item : "+item.data.dsuseDe)
|
|
|
|
|
|
|
|
alert($("#dsuseDe--${pageName}").val())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 보고완료 상태인 경우 저장 버튼 비활성화
|
|
|
|
// 보고완료 상태인 경우 저장 버튼 비활성화
|
|
|
|
if($("input[name='prgrsSttsCd']").val() == '99') {
|
|
|
|
if($("input[name='prgrsSttsCd']").val() == '99') {
|
|
|
|
$("#btnSave--${pageName}").prop("disabled", true);
|
|
|
|
$("#btnSave--${pageName}").prop("disabled", true);
|
|
|
@ -280,13 +285,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
// 저장
|
|
|
|
// 저장
|
|
|
|
$P.control.save = (info, fileArr) => {
|
|
|
|
$P.control.save = (info, fileArr) => {
|
|
|
|
// if(fileArr.length == 0){
|
|
|
|
|
|
|
|
// dialog.alert({
|
|
|
|
|
|
|
|
// content: "폐기(진행) 사진을 1개 이상 등록해 주세요."
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let saveData = {
|
|
|
|
let saveData = {
|
|
|
|
...info,
|
|
|
|
...info,
|
|
|
|
prgrsSttsCd: "06",
|
|
|
|
prgrsSttsCd: "06",
|
|
|
@ -388,10 +386,10 @@
|
|
|
|
if($P.fileArr.length > 0){
|
|
|
|
if($P.fileArr.length > 0){
|
|
|
|
let tagsText = $P.fnMakeImgTags($P.fileArr);
|
|
|
|
let tagsText = $P.fnMakeImgTags($P.fileArr);
|
|
|
|
document.querySelector("#dragAndDrop--${pageName}").innerHTML = tagsText;
|
|
|
|
document.querySelector("#dragAndDrop--${pageName}").innerHTML = tagsText;
|
|
|
|
$("#btnImageDel--${pageName}").removeAttr("hidden");
|
|
|
|
$("#btnImgDel--${pageName}").removeAttr("hidden");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
document.querySelector("#dragAndDrop--${pageName}").innerHTML = "";
|
|
|
|
document.querySelector("#dragAndDrop--${pageName}").innerHTML = "";
|
|
|
|
$("#btnImageDel--${pageName}").attr("hidden","hidden");
|
|
|
|
$("#btnImgDel--${pageName}").attr("hidden","hidden");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -469,7 +467,7 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//이미지 삭제 버튼
|
|
|
|
//이미지 삭제 버튼
|
|
|
|
$("#btnImageDel--${pageName}").on("click", function() {
|
|
|
|
$("#btnImgDel--${pageName}").on("click", function() {
|
|
|
|
let checkeds = $("#dragAndDrop--${pageName}").find(":checkbox[name='dsuseDsuseImgFilesSelector']:checked");
|
|
|
|
let checkeds = $("#dragAndDrop--${pageName}").find(":checkbox[name='dsuseDsuseImgFilesSelector']:checked");
|
|
|
|
if(checkeds.length > 0){
|
|
|
|
if(checkeds.length > 0){
|
|
|
|
let keys = [];
|
|
|
|
let keys = [];
|
|
|
@ -486,7 +484,11 @@
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
|
|
|
|
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
|
|
|
|
|
|
|
|
|
|
|
|
$("#dsuseDe--${pageName}, #dsuseMthCd--${pageName}").on("change", () => {
|
|
|
|
$("#dsuseDe--${pageName}, #dsuseMthCd--${pageName}").on("change", () => {
|
|
|
|
if(initDataset) fnRsltImgList();
|
|
|
|
if(!initDataset){
|
|
|
|
|
|
|
|
initDataset = true;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!isEditData) searchRsltImgList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|