mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-06 12:13:36 +09:00
#update
/stock/create.jsp /warehouse/create.jsp /stock/list.jsp /warehouse/list.jsp /warehouse/read.jsp StockController.java StockDto.java StockMapper.xml StockMapper.java StockService.java VendorDto.java WarehouseMapper.xml WarehouseController.java #insert /vendor/create.jsp /vendor/list.jsp product_category_company_search.jsp /stock/read.jsp /vendor/read.jsp /stock/update.jsp /vendor/update.jsp VendorController.java VendorMapper.java VendorMapper.xml VendorService.java warehouse_capacity_currentCapacity.jsp
This commit is contained in:
@@ -1,25 +1,26 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ page contentType="text/html; charset=UTF-8" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>창고 생성</title>
|
||||
<style>
|
||||
.body{
|
||||
.body {
|
||||
text-align: center;
|
||||
}
|
||||
.col-centered{
|
||||
|
||||
.col-centered {
|
||||
margin: 0 auto;
|
||||
float: none;
|
||||
}
|
||||
.col-margin-left-32{
|
||||
|
||||
.col-margin-left-32 {
|
||||
margin-left: 32%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -34,9 +35,10 @@
|
||||
<div class="col-12" style="text-align: center;">
|
||||
|
||||
|
||||
<-- 세션 만들어지고 value 수정-->
|
||||
<%-- 세션 만들어지고 value 수정--%>
|
||||
<input type='hidden' id="managerId" value="e9882095-aeb2-11ee-935d-0242ac110006">
|
||||
|
||||
<input type='hidden' id="currentCapacity" value="0">
|
||||
<input type='hidden' id="activation" value="1">
|
||||
|
||||
|
||||
<div class="input-group mb-3 w-40 col-centered">
|
||||
@@ -75,28 +77,29 @@
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
$("#submitBtn").on("click", function(){
|
||||
$("#submitBtn").on("click", function () {
|
||||
var managerId = $("#managerId").val();
|
||||
var name = $("#name").val();
|
||||
var capacity = $("#capacity").val();
|
||||
var address = $("#address").val();
|
||||
var currentCapacity = $("#currentCapacity").val();
|
||||
var activation = $("#activation").val();
|
||||
|
||||
if(!name){
|
||||
if (!name) {
|
||||
alert("창고명을 입력해야 합니다.");
|
||||
$("#name").focus();
|
||||
return false;
|
||||
}
|
||||
if(!capacity){
|
||||
if (!capacity) {
|
||||
alert("중분류를 입력해야 합니다.");
|
||||
$("#capacity").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!address){
|
||||
if (!address) {
|
||||
alert("중분류를 입력해야 합니다.");
|
||||
$("#address").focus();
|
||||
return false;
|
||||
@@ -107,14 +110,16 @@
|
||||
url: "/warehouse/create_process",
|
||||
type: "post",
|
||||
data: {
|
||||
"managerId" : managerId,
|
||||
"managerId": managerId,
|
||||
"name": name,
|
||||
"capacity": capacity,
|
||||
"address": address
|
||||
"address": address,
|
||||
"currentCapacity": currentCapacity,
|
||||
"activation": activation
|
||||
|
||||
},
|
||||
datatype:"json"
|
||||
}).done(function(data) {
|
||||
datatype: "json"
|
||||
}).done(function (data) {
|
||||
if (data == true) {
|
||||
alert("창고가 생성되었습니다.");
|
||||
|
||||
@@ -130,27 +135,25 @@
|
||||
form.appendChild(input);
|
||||
|
||||
form.submit();
|
||||
|
||||
window.location.href = "/warehouse/list";
|
||||
} else {
|
||||
alert("창고 생성에 실패하였습니다.");
|
||||
}
|
||||
}).fail(function() {
|
||||
}).fail(function () {
|
||||
alert("오류가 발생했습니다.");
|
||||
}).always(function() {
|
||||
}).always(function () {
|
||||
//
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
$("#cancelBtn").on("click", function(){
|
||||
$("#cancelBtn").on("click", function () {
|
||||
$(location).attr("href", "/warehouse/list");
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div class="row">
|
||||
<div class="container-fluid">
|
||||
<div class="col-12">
|
||||
<form action="list">
|
||||
<form>
|
||||
<div class="input-group mb-3 w-30 col-centered">
|
||||
<div class="w-25">
|
||||
<select class="form-select" name="searchn" id="searchn">
|
||||
@@ -62,11 +62,11 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${wlist }" var="dto">
|
||||
<tr class="detailTr" data-id="${dto.id}">
|
||||
<td>${start} <c:set var="start" value="${start +1 }"/></td>
|
||||
<td>${dto.name }</td>
|
||||
<td>${dto.capacity }</td>
|
||||
<td>${dto.currentCapacity }</td>
|
||||
<tr class="detailTr col-4" data-id="${dto.id}">
|
||||
<td class="col-1">${start} <c:set var="start" value="${start +1 }"/></td>
|
||||
<td class="col-1">${dto.name }</td>
|
||||
<td class="col-1">${dto.capacity }</td>
|
||||
<td class="col-1">${dto.currentCapacity }</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
@@ -85,24 +85,29 @@
|
||||
|
||||
<c:if test="${begin > pageNum }">
|
||||
<li class="page-item">
|
||||
<a href="javascript:void(0);" class="page-link" onclick="pageingFunction(this.id)" id="${begin - 1 }"><</a>
|
||||
<a href="javascript:void(0);" class="page-link"
|
||||
onclick="pageingFunction(this.id)" id="${begin - 1 }"><</a>
|
||||
</li>
|
||||
</c:if>
|
||||
<c:forEach begin="${begin }" end="${end }" var="i">
|
||||
<li class="page-item <c:if test="${p == i}"> active </c:if>">
|
||||
<a href="javascript:void(0);" class="page-link " onclick="pageingFunction(this.id); return false;" id="${i }">${i }</a>
|
||||
<a href="javascript:void(0);" class="page-link "
|
||||
onclick="pageingFunction(this.id); return false;" id="${i }">${i }</a>
|
||||
</li>
|
||||
</c:forEach>
|
||||
<c:if test="${end < totalPages }">
|
||||
<li class="page-item">
|
||||
<a href="javascript:void(0);" class="page-link" onclick="pageingFunction(this.id)" id="${end + 1 }">></a>
|
||||
<a href="javascript:void(0);" class="page-link"
|
||||
onclick="pageingFunction(this.id)" id="${end + 1 }">></a>
|
||||
</li>
|
||||
</c:if>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-3 text-end">
|
||||
<button type="button" class="btn btn-primary" onclick="window.location.href='/warehouse/create'">생성</button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
onclick="window.location.href='/warehouse/create'">생성
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -135,7 +140,7 @@
|
||||
});
|
||||
|
||||
//검색기능
|
||||
$("#searchBtn").on("click",function(){
|
||||
$("#searchBtn").on("click", function () {
|
||||
|
||||
var searchn = $("#searchn").val();
|
||||
var search = $("#search").val();
|
||||
@@ -169,7 +174,7 @@
|
||||
|
||||
});//ready
|
||||
|
||||
function pageingFunction(clickedId){
|
||||
function pageingFunction(clickedId) {
|
||||
var searchn1 = $("#searchn1").val();
|
||||
var search1 = $("#search1").val();
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${wlist }" var="dto">
|
||||
<tr class="detailTr" data-id="${dto.id}">
|
||||
<tr class="detailTr">
|
||||
<td>${start} <c:set var="start" value="${start +1 }"/></td>
|
||||
<td>${dto.name }</td>
|
||||
<td>${dto.quantity }</td>
|
||||
@@ -172,10 +172,10 @@
|
||||
|
||||
|
||||
|
||||
yesNoModal.yesFunction = deleteCategoryFunction;
|
||||
yesNoModal.yesFunction = deleteWarehouseFunction;
|
||||
|
||||
|
||||
function deleteCategoryFunction(){
|
||||
function deleteWarehouseFunction(){
|
||||
var id = $("#id").val();
|
||||
$.ajax({
|
||||
url: "/warehouse/delete",
|
||||
|
||||
Reference in New Issue
Block a user