mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 04:03:45 +09:00
in complete
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row row-buttons">
|
||||
<div class="col-3 text-start">
|
||||
<!-- <img alt="엑셀이미지" src="엑셀이미지"> -->
|
||||
<img width="50" height="50" src="https://img.icons8.com/color/48/ms-excel.png" alt="ms-excel"/>
|
||||
<button type="button" class="btn btn-success" id="downlodeExcelForm">양식다운로드</button>
|
||||
|
||||
|
||||
@@ -101,25 +101,10 @@
|
||||
</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>
|
||||
<input type="file" name="file" id="file" accept=".xlsx, .xls"/>
|
||||
<button type="submit" class="btn btn-success" id="uploadExcel">업로드</button>
|
||||
</form><!-- uplodeExcleForm -->
|
||||
|
||||
</div><!-- row row-buttons -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
alert("삭제되었습니다.");
|
||||
$(location).attr("href", "/category/list");
|
||||
} else {
|
||||
alert("정상적으로 삭제되지 않았습니다..");
|
||||
alert("정상적으로 삭제되지 않았습니다.");
|
||||
}
|
||||
}).fail(function() {
|
||||
alert("오류가 발생했습니다.");
|
||||
@@ -127,8 +127,6 @@
|
||||
$("#yesNoModalBodyTextDiv").text(yesNoModal.body);
|
||||
yesNoModal.yesFunction = deleteCategoryFunction;
|
||||
yesNoModalBootStrap.show();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -138,6 +138,10 @@
|
||||
var in_date = $("#in_date").val();
|
||||
var manager_id = $("#manager_id").val();
|
||||
var note = $("#note").val();
|
||||
var quantity = parseInt($("#quantity").val(), 10);
|
||||
var remainingcapacity = parseInt($("#remainingcapacity").val(), 10);
|
||||
|
||||
|
||||
|
||||
if(!product_id){
|
||||
alert("제품을 선택해야합니다.");
|
||||
@@ -153,6 +157,12 @@
|
||||
alert("창고을 선택해야합니다.");
|
||||
return false;
|
||||
}
|
||||
if (quantity > remainingcapacity) {
|
||||
alert("적재 할 재고량이 잔여 용량을 넘을 수 없습니다.");
|
||||
$("#quantity").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!in_date){
|
||||
in_date = new Date();
|
||||
in_date = in_date.toISOString();
|
||||
|
||||
@@ -113,8 +113,41 @@
|
||||
|
||||
});//ready
|
||||
|
||||
function deleteInFunction(){
|
||||
var id = $("#id").val();
|
||||
$.ajax({
|
||||
url: "/in/delete",
|
||||
type: "delete",
|
||||
data: {
|
||||
"id": id
|
||||
},
|
||||
datatype:"json"
|
||||
}).done(function(data) {
|
||||
if (data == true) {
|
||||
alert("삭제되었습니다.");
|
||||
$(location).attr("href", "/in/list");
|
||||
} else {
|
||||
alert("정상적으로 삭제되지 않았습니다.");
|
||||
}
|
||||
}).fail(function() {
|
||||
alert("오류가 발생했습니다.");
|
||||
}).always(function() {
|
||||
//
|
||||
});
|
||||
|
||||
}//deleteInFunction
|
||||
|
||||
|
||||
function goDelete(){
|
||||
yesNoModalTextDefine("입고 삭제", "해당 입고를 삭제하시겠습니까?");
|
||||
$("#yesNoModalLabel").text(yesNoModal.title);
|
||||
$("#yesNoModalBodyTextDiv").text(yesNoModal.body);
|
||||
yesNoModal.yesFunction = deleteInFunction;
|
||||
yesNoModalBootStrap.show();
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -28,7 +28,7 @@
|
||||
<button class="btn btn-outline-secondary rounded-end" id="searchProductName"
|
||||
style="background-color:#FF5E5E;" type="button"
|
||||
onclick="showSearchModal_product('제품 검색','product')">검색</button>
|
||||
<input type='hidden' id="product_id" value="">
|
||||
<input type='hidden' id="product_id" value="${dto.product_id}">
|
||||
</div>
|
||||
|
||||
<div class="input-group mb-3 w-40 col-centered">
|
||||
@@ -52,7 +52,7 @@
|
||||
<div class="input-group mb-3 w-40 col-centered">
|
||||
<span class="input-group-text" id="basic-addon2">수량</span>
|
||||
<input type="number" name="quantity" id="quantity" class="form-control"
|
||||
value="${dto.quantity}" readonly>
|
||||
value="${dto.quantity}">
|
||||
</div>
|
||||
|
||||
<div class="input-group mb-3 w-40 col-centered">
|
||||
@@ -63,7 +63,7 @@
|
||||
<button class="btn btn-outline-secondary rounded-end" id="searchWarehouseName"
|
||||
style="background-color:#FF5E5E;" type="button"
|
||||
onclick="showSearchModal_warehouse('창고 검색','warehouse_capacity_currentCapacity')">검색</button>
|
||||
<input type='hidden' id="warehouse_id" value="">
|
||||
<input type='hidden' id="warehouse_id" value="${dto.warehouse_id}">
|
||||
</div>
|
||||
|
||||
<div class="input-group mb-3 w-40 col-centered">
|
||||
@@ -145,11 +145,11 @@
|
||||
var in_date = $("#in_date").val();
|
||||
var manager_id = $("#manager_id").val();
|
||||
var note = $("#note").val();
|
||||
if(!name){
|
||||
alert("제품명을 입력해야 합니다.");
|
||||
$("#name").focus();
|
||||
return false;
|
||||
}
|
||||
var id = $("#id").val();
|
||||
var quantityAdjustment = parseInt($("#quantityAdjustment").val(), 10);
|
||||
var remainingcapacity = parseInt($("#remainingcapacity").val(), 10);
|
||||
|
||||
|
||||
if(!product_id){
|
||||
alert("제품을 선택해야합니다.");
|
||||
return false;
|
||||
@@ -164,6 +164,12 @@
|
||||
alert("창고을 선택해야합니다.");
|
||||
return false;
|
||||
}
|
||||
if (quantityAdjustment > remainingcapacity) {
|
||||
alert("적재 할 재고량이 재고량 한도를 넘을 수 없습니다.");
|
||||
$("#quantityAdjustment").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!in_date){
|
||||
in_date = new Date();
|
||||
in_date = in_date.toISOString();
|
||||
@@ -178,9 +184,10 @@
|
||||
in_date : in_date,
|
||||
manager_id : manager_id,
|
||||
warehouse_id : warehouse_id,
|
||||
note : note
|
||||
note : note,
|
||||
id : id
|
||||
}
|
||||
|
||||
console.log(data);
|
||||
$.ajax({
|
||||
url: "/in/update_process",
|
||||
type: "put",
|
||||
@@ -208,6 +215,7 @@
|
||||
|
||||
} else {
|
||||
alert("입고 수정에 실패하였습니다.");
|
||||
console.log(data);
|
||||
}
|
||||
}).fail(function() {
|
||||
alert("오류가 발생했습니다.");
|
||||
|
||||
Reference in New Issue
Block a user