mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 04:03:45 +09:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -69,7 +69,9 @@
|
||||
<div class="row row-buttons">
|
||||
<div class="col-3 text-start">
|
||||
<!-- <img alt="엑셀이미지" src="엑셀이미지"> -->
|
||||
<button type="button" class="btn btn-success" id="uploadExcel">업로드</button>
|
||||
<button type="button" class="btn btn-success" id="downlodeExcelForm">양식다운로드</button>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 d-flex justify-content-center">
|
||||
<nav>
|
||||
@@ -97,6 +99,28 @@
|
||||
<button type="button" class="btn btn-primary" id="createButton">생성</button>
|
||||
</div>
|
||||
</div><!-- row row-buttons -->
|
||||
<div class="row row-buttons">
|
||||
<form name="uplodeExcleForm" id="uplodeExcleForm" method="post" onsubmit="return _onSubmit();" action="/category/uplodeExcel" enctype="multipart/form-data" class="form-horizontal">
|
||||
<div class="col-4 text-start">
|
||||
<table id="datatable-scroller" class="table table-bordered tbl_Form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="active" style="text-align:right"><label class="control-label" for="">파일 업로드</label></th>
|
||||
<td>
|
||||
<input type="file" name="file" id="file" accept=".xlsx, .xls"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-4 text-start">
|
||||
<div class="d-flex justify-content-start align-items-center">
|
||||
<button type="submit" class="btn btn-success" id="uploadExcel">업로드</button>
|
||||
</div>
|
||||
</div>
|
||||
</form><!-- uplodeExcleForm -->
|
||||
</div><!-- row row-buttons -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -113,6 +137,16 @@
|
||||
document.body.appendChild(form);
|
||||
form.submit();
|
||||
});
|
||||
|
||||
$("#downlodeExcelForm").on("click",function(){
|
||||
var form = document.createElement("form");
|
||||
form.action = "/category/downlodeCategoryForm";
|
||||
form.method = "GET";
|
||||
document.body.appendChild(form);
|
||||
form.submit();
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("body").on("click", ".detailTr", function(){
|
||||
var kan_code = $(this).data("kan_code");
|
||||
@@ -166,8 +200,13 @@
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
var msg = "${resMap.msg}";
|
||||
if (msg != "") alert(msg);
|
||||
|
||||
});//ready
|
||||
|
||||
|
||||
function pagingFunction(clickedId){
|
||||
var searchn1 = $("#searchn1").val();
|
||||
var search1 = $("#search1").val();
|
||||
@@ -196,7 +235,27 @@
|
||||
|
||||
document.body.appendChild(form);
|
||||
form.submit();
|
||||
}
|
||||
|
||||
}//pagingFunction
|
||||
|
||||
|
||||
function _onSubmit(){
|
||||
|
||||
if($("#file").val() == ""){
|
||||
alert("파일을 업로드해주세요.");
|
||||
$("#file").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,77 +5,54 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>test상세페이지</title>
|
||||
<style type="text/css">
|
||||
.col-centered{
|
||||
margin: 0 auto;
|
||||
float: none;
|
||||
}
|
||||
.col-margin-left-32{
|
||||
margin-left: 32%;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
test success
|
||||
<br>
|
||||
<hr>
|
||||
<c:forEach items="${dto }" var="item">
|
||||
${item.kan_code} : ${item.cls_nm_1} > ${item.cls_nm_2} > ${item.cls_nm_3} > ${item.cls_nm_4}<br>
|
||||
활성화 : ${item.activation}<br>
|
||||
<hr>
|
||||
</c:forEach>
|
||||
코드테스트 버튼 :
|
||||
<div class="input-group mb-3 w-40 col-centered">
|
||||
<input type="text" name="kan_code" id="kan_code" class="form-control"
|
||||
placeholder="KAN 분류코드" aria-label="KAN 분류코드"
|
||||
aria-describedby="button-addon2">
|
||||
<button class="btn btn-outline-secondary" id="checkKan"
|
||||
style="background-color: #FF5E5E;" type="button" id="button-addon2">중복확인</button>
|
||||
</div>
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#checkKan").on("click", function() {
|
||||
// 중복 클릭 방지를 위해 버튼을 비활성화
|
||||
$("#checkKan").prop("disabled", true);
|
||||
|
||||
let kanCode = $("#kan_code").val();
|
||||
|
||||
if (!kanCode) {
|
||||
alert("KAN 분류코드를 입력하세요.");
|
||||
$("#kan_code").focus();
|
||||
// 버튼 다시 활성화
|
||||
$("#checkKan").prop("disabled", false);
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "/category/checkKancode",
|
||||
type: "post",
|
||||
data: {"kan_code": kanCode},
|
||||
datatype:"text"
|
||||
}).done(function(data) {
|
||||
if (data == "") {
|
||||
$("#checkKan").css("background-color", "#4CAF50"); // 파란색 배경으로 변경
|
||||
$("#checkKan").text("사용가능"); // 버튼 텍스트 변경
|
||||
|
||||
$("#checkKan").append("<input type='hidden' id='kan_chack' value='1'>");
|
||||
} else {
|
||||
$("#checkKan").css("background-color", "#FF5E5E"); // 원래의 빨간색 배경으로 변경
|
||||
$("#checkKan").text("사용불가"); // 버튼 텍스트 변경
|
||||
}
|
||||
}).fail(function() {
|
||||
alert("오류가 발생했습니다.");
|
||||
}).always(function() {
|
||||
// Ajax 요청 완료 후 버튼 다시 활성화
|
||||
$("#checkKan").prop("disabled", false);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="row row-buttons">
|
||||
<form name="uplodeExcleForm" id="uplodeExcleForm" method="post" onsubmit="return _onSubmit();" action="/category/uplodeExcel" enctype="multipart/form-data" class="form-horizontal">
|
||||
<div class="col-4 text-start">
|
||||
<table id="datatable-scroller" class="table table-bordered tbl_Form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="active" style="text-align:right"><label class="control-label" for="">파일 업로드</label></th>
|
||||
<td>
|
||||
<input type="file" name="file" id="file" accept=".xlsx, .xls"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-4 text-start">
|
||||
<div class="d-flex justify-content-start align-items-center">
|
||||
<button type="submit" class="btn btn-success" id="uploadExcel">업로드</button>
|
||||
</div>
|
||||
</div>
|
||||
</form><!-- uplodeExcleForm -->
|
||||
</div><!-- row row-buttons -->
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
var msg = "${resMap.msg}";
|
||||
if (msg != "") alert(msg);
|
||||
|
||||
});//ready
|
||||
function _onSubmit(){
|
||||
|
||||
if($("#file").val() == ""){
|
||||
alert("파일을 업로드해주세요.");
|
||||
$("#file").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
32
src/main/webapp/WEB-INF/views/main.jsp
Normal file
32
src/main/webapp/WEB-INF/views/main.jsp
Normal file
@@ -0,0 +1,32 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<!-- 첫 번째 공간 -->
|
||||
달력
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<!-- 두 번째 공간 -->
|
||||
로고
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<!-- 세 번째 공간 -->
|
||||
부족한 재고
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<!-- 네 번째 공간 -->
|
||||
개시판(공지사항)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user