충전사업자 html코드 추가

This commit is contained in:
2026-07-28 17:20:48 +09:00
parent 802b3e3224
commit 69a0529b7c
@@ -0,0 +1,290 @@
<!DOCTYPE html>
<html xmlns:th="http://thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/cmsLayout}">
<body>
<section layout:fragment="Content">
<div class="w-100" style="margin-bottom: .3rem;">
<div th:replace="~{common/fragments/searchBox :: SearchBoxFragment(~{ :: #searchBoxContent}, ~{ :: #searchBoxFooter})}">
<div id="searchBoxContent">
<div class="row px-2">
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">충전사업자명</span>
<input type="text" id="providerNmLike" name="providerNmLike" class="form-control" placeholder="충전사업자 명 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">사업자번호</span>
<input type="text" id="bizTaxIdLike" name="bizTaxIdLike" class="form-control" placeholder="사업자번호 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">대표자</span>
<input type="text" id="ceoLike" name="ceoLike" class="form-control" placeholder="대표자 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">전화번호</span>
<input type="text" id="telLike" name="telLike" class="form-control" placeholder="전화번호 입력" maxlength="50">
</div>
</div>
<div class="col-lg-4 col-sm-6 col-xs-12 pb-1">
<div class="input-group">
<span class="input-group-text" style="width:140px">팩스번호</span>
<input type="text" id="faxLike" name="faxLike" class="form-control" placeholder="팩스번호 입력" maxlength="50">
</div>
</div>
</div>
</div>
<div id="searchBoxFooter">
<div class="row float-end">
<div class="col-xs-12 ">
<button type="button" class="btn btn-sm btn-info" id="searchBtn">검색</button>
<button type="button" class="btn btn-sm btn-info" id="resetBtn">리셋</button>
<th:block th:if="${menuRole?.roleWrite eq true}">
<button type="button" class="btn btn-sm btn-primary pl-2" onclick="showModal(ModalMode.REGISTER, {}, '');">등록</button>
</th:block>
</div>
</div>
</div>
</div>
</div>
<div class="w-100">
<div class="box box-primary">
<div class="form">
<table id="datatable" class="table table-striped table-hover dataTable" style="width:100%;"></table>
</div>
</div>
</div>
<script th:inline="none">
const rootPath = "/cms/provider/";
let datatable;
$(document).ready(function() {
const className = "dt-head-center dt-body-center";
datatable = newDataTable(
"#datatable",
rootPath + "list.json",
function(d) {
if (strUtil.isNotEmpty($('#providerNmLike').val())) {d.providerNm = $('#providerNmLike').val();}
if (strUtil.isNotEmpty($('#bizTaxIdLike').val())) {d.bizTaxId = $('#bizTaxIdLike').val();}
if (strUtil.isNotEmpty($('#ceoLike').val())) {d.ceo = $('#ceoLike').val();}
if (strUtil.isNotEmpty($('#telLike').val())) {d.tel = $('#telLike').val();}
if (strUtil.isNotEmpty($('#faxLike').val())) {d.fax = $('#faxLike').val();}
return d;
},
{
order: [],
columns: [
{title: "충전사업자 명", name: "PROVIDER_NM", data: "providerNm", className, orderable: false},
{title: "사업자번호", name: "biz_tax_id", data: "bizTaxId", className, orderable: false},
{title: "대표자", name: "CEO", data: "ceo", className, orderable: false},
{title: "전화번호", name: "TEL", data: "tel", className, orderable: false},
{title: "팩스번호", name: "FAX", data: "fax", className, orderable: false},
],
allCheck: false,
});
});
const showModal = (mode, ids, title) => {
if(!checkRole(mode)) { alert("권한이 없습니다."); return; }
let modalInputArray = [
new ModalInput({
inputType: ModalInputType.hidden,
inputId: "providerId",
inputName: "providerId",
hasOldPk: true,
inputLabel: "provider_id",
inputPlaceholder: "provider_id",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 20,
}),
new ModalInput({
inputType: ModalInputType.text,
inputId: "providerNm",
inputName: "providerNm",
inputLabel: "충전사업자 명",
inputPlaceholder: "충전사업자 명",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 50,
}),
new ModalInput({
inputType: ModalInputType.text,
inputId: "bizTaxId",
inputName: "bizTaxId",
inputLabel: "사업자번호",
inputPlaceholder: "사업자번호",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 20,
}),
new ModalInput({
inputType: ModalInputType.text,
inputId: "ceo",
inputName: "ceo",
inputLabel: "대표자",
inputPlaceholder: "대표자",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 50,
}),
new ModalInput({
inputType: ModalInputType.text,
inputId: "tel",
inputName: "tel",
inputLabel: "전화번호",
inputPlaceholder: "전화번호",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 30,
}),
new ModalInput({
inputType: ModalInputType.text,
inputId: "fax",
inputName: "fax",
inputLabel: "팩스번호",
inputPlaceholder: "팩스번호",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 30,
}),
new ModalInput({
inputType: ModalInputType.textarea,
inputId: "email",
inputName: "email",
inputLabel: "이메일",
inputPlaceholder: "이메일",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 250,
}),
new ModalInput({
inputType: ModalInputType.text,
inputId: "mgrNm",
inputName: "mgrNm",
inputLabel: "담당자 명",
inputPlaceholder: "담당자 명",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 50,
}),
new ModalInput({
inputType: ModalInputType.text,
inputId: "mgrTel",
inputName: "mgrTel",
inputLabel: "담당자 전화번호",
inputPlaceholder: "담당자 전화번호",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 30,
}),
new ModalInput({
inputType: ModalInputType.text,
inputId: "emgncyTel",
inputName: "emgncyTel",
inputLabel: "긴급 전화번호",
inputPlaceholder: "긴급 전화번호",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 30,
}),
new ModalInput({
inputType: ModalInputType.text,
inputId: "zipCode",
inputName: "zipCode",
inputLabel: "우편번호",
inputPlaceholder: "우편번호",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 7,
}),
new ModalInput({
inputType: ModalInputType.textarea,
inputId: "addrRdM",
inputName: "addrRdM",
inputLabel: "주소 도로명 메인",
inputPlaceholder: "주소 도로명 메인",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 255,
}),
new ModalInput({
inputType: ModalInputType.textarea,
inputId: "addrRdD",
inputName: "addrRdD",
inputLabel: "주소 도로명 상세",
inputPlaceholder: "주소 도로명 상세",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 255,
}),
new ModalInput({
inputType: ModalInputType.textarea,
inputId: "remark",
inputName: "remark",
inputLabel: "비고",
inputPlaceholder: "비고",
isReq: false,
isEnable: true,
minLen: 0,
maxLen: 250,
})
];
if(!rootPath){ alert("rootPath를 지정하십시요."); return; }
const insertUrl = rootPath+"insert.json";
const updateUrl = rootPath+"update.json";
const loadUrl = rootPath+"view.json";
const deleteUrl = rootPath+"delete.json";
const modalWidth = 500;
const labelWidth = '90px';
if(mode === ModalMode.REGISTER) {
newModal(new ModalInfo({modalTitle: "등록", inputArray: modalInputArray, modalWidth}), mode, 'main', {insertUrl, labelWidth, callBack: () => { defaultCallback(); }})
} else if(mode===ModalMode.VIEW || mode===ModalMode.VIEW_ONLY || mode===ModalMode.MODIFY) {
newModal(new ModalInfo({modalTitle: "상세정보", inputArray: modalInputArray, modalWidth}), mode, 'main', {loadUrl, updateUrl, ids, labelWidth, callBack: () => { defaultCallback(); }})
} else if(mode === ModalMode.DELETE) {
newDelete(deleteUrl, ids, title, () => { defaultCallback(); });
}
const defaultCallback = () => {
datatable.ajax.reload();
}
};
$("#searchBtn").click(function() {
datatable.ajax.reload();
});
$("#resetBtn").click(function() {
$("#providerNmLike").val("");
$("#bizTaxIdLike").val("");
$("#ceoLike").val("");
$("#telLike").val("");
$("#faxLike").val("");
datatable.ajax.reload();
});
</script>
</section>
</body>
</html>