mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -11,6 +11,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.no1.wms.vendor.VendorDto;
|
||||||
import org.apache.poi.ss.usermodel.Cell;
|
import org.apache.poi.ss.usermodel.Cell;
|
||||||
import org.apache.poi.ss.usermodel.Row;
|
import org.apache.poi.ss.usermodel.Row;
|
||||||
import org.apache.poi.ss.usermodel.Sheet;
|
import org.apache.poi.ss.usermodel.Sheet;
|
||||||
@@ -119,6 +120,74 @@ public class ExcelDownlodeUtils {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void downloadVendorExcelFile(String excelFileName, HttpServletResponse response,
|
||||||
|
String sheetName, String[] columnName, List<VendorDto> dto) {
|
||||||
|
String fileName = "";
|
||||||
|
try {
|
||||||
|
fileName = new String((excelFileName + ".xlsx").getBytes("utf-8"), "iso-8859-1");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
response.setContentType("ms-vnd/excel");
|
||||||
|
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\";");
|
||||||
|
|
||||||
|
Workbook workbook = new XSSFWorkbook();
|
||||||
|
Sheet sheet = workbook.createSheet(sheetName);
|
||||||
|
|
||||||
|
Row row = null;
|
||||||
|
Cell cell = null;
|
||||||
|
int rowNum = 0;
|
||||||
|
|
||||||
|
row = sheet.createRow(rowNum);
|
||||||
|
for( int i = 0; i <= columnName.length -1; i++ ) {
|
||||||
|
cell = row.createCell(i);
|
||||||
|
cell.setCellValue(columnName[i]);
|
||||||
|
}
|
||||||
|
rowNum += 1;
|
||||||
|
|
||||||
|
//수정부분
|
||||||
|
makeVendorBody(dto,row,sheet,cell,rowNum);
|
||||||
|
|
||||||
|
try {
|
||||||
|
workbook.write(response.getOutputStream());
|
||||||
|
workbook.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void makeVendorBody(List<VendorDto> listdto, Row row, Sheet sheet,
|
||||||
|
Cell cell, int rowNum) {
|
||||||
|
//
|
||||||
|
for (int i = 0; i < listdto.size(); i++) {
|
||||||
|
row = sheet.createRow(rowNum++);
|
||||||
|
VendorDto dto = listdto.get(i);
|
||||||
|
cell = row.createCell(0);
|
||||||
|
cell.setCellValue(dto.getName());
|
||||||
|
cell = row.createCell(1);
|
||||||
|
cell.setCellValue(dto.getPresident_name());
|
||||||
|
cell = row.createCell(2);
|
||||||
|
cell.setCellValue(dto.getAddress());
|
||||||
|
cell = row.createCell(3);
|
||||||
|
cell.setCellValue(dto.getRegistration_number());
|
||||||
|
cell = row.createCell(4);
|
||||||
|
cell.setCellValue(dto.getEmail());
|
||||||
|
cell = row.createCell(5);
|
||||||
|
cell.setCellValue(dto.getPresident_telephone());
|
||||||
|
cell = row.createCell(6);
|
||||||
|
cell.setCellValue(dto.getVendor_manager());
|
||||||
|
cell = row.createCell(7);
|
||||||
|
cell.setCellValue(dto.getVendor_manager_telephone());
|
||||||
|
cell = row.createCell(8);
|
||||||
|
cell.setCellValue(dto.getMain_product());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/resetpassword")
|
@RequestMapping("/resetpassword")
|
||||||
@@ -20,21 +21,16 @@ public class ResetPasswordController {
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public String list(@RequestParam(name = "searchn", defaultValue = "0") int searchn,
|
public String list(@RequestParam(name = "searchn", defaultValue = "0") int searchn,
|
||||||
@RequestParam(name = "search", defaultValue = "") String search,
|
@RequestParam(name = "search", defaultValue = "") String search,
|
||||||
@RequestParam(name = "p", defaultValue = "1") int page, String resetpassword, String cancelrequest, Model m) {
|
@RequestParam(name = "p", defaultValue = "1") int page,
|
||||||
|
Model m) {
|
||||||
int count = resetPasswordService.count(searchn, search);
|
int count = resetPasswordService.count(searchn, search);
|
||||||
|
|
||||||
int perPage = 10; // 한 페이지에 보일 글의 갯수
|
int perPage = 10; // 한 페이지에 보일 글의 갯수
|
||||||
int startRow = (page - 1) * perPage;
|
int startRow = (page - 1) * perPage;
|
||||||
|
|
||||||
if(resetpassword != null){
|
|
||||||
|
|
||||||
}
|
|
||||||
if(cancelrequest != null){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//스톡서비스로 재고 리스트 출력 메서트 작성
|
//스톡서비스로 재고 리스트 출력 메서트 작성
|
||||||
List<Map<String, Object>> dto = resetPasswordService.list(searchn, search, startRow ,perPage);
|
List<Map<String, Object>> dto = resetPasswordService.list(searchn, search, startRow ,perPage);
|
||||||
|
|
||||||
m.addAttribute("rlist", dto);
|
m.addAttribute("rlist", dto);
|
||||||
|
|
||||||
m.addAttribute("start", startRow + 1);
|
m.addAttribute("start", startRow + 1);
|
||||||
@@ -55,8 +51,6 @@ public class ResetPasswordController {
|
|||||||
m.addAttribute("totalPages", totalPages);
|
m.addAttribute("totalPages", totalPages);
|
||||||
m.addAttribute("p" , page);
|
m.addAttribute("p" , page);
|
||||||
|
|
||||||
System.out.println("테스트 : : " + m);
|
|
||||||
|
|
||||||
|
|
||||||
return "resetpassword/list";
|
return "resetpassword/list";
|
||||||
}
|
}
|
||||||
@@ -70,13 +64,22 @@ public class ResetPasswordController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public String delete(ResetPasswordDto dto, Gson gson){
|
public int delete(ResetPasswordDto dto){
|
||||||
|
int i = resetPasswordService.delete(dto);
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@ResponseBody
|
||||||
|
public boolean update(ResetPasswordDto dto) {
|
||||||
|
int i = resetPasswordService.passwordUpdate(dto);
|
||||||
|
if (i != 0) {
|
||||||
resetPasswordService.delete(dto);
|
resetPasswordService.delete(dto);
|
||||||
|
return true;
|
||||||
return gson.toJson("s");
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ public interface ResetPasswordMapper {
|
|||||||
|
|
||||||
void insert(ResetPasswordDto dto);
|
void insert(ResetPasswordDto dto);
|
||||||
|
|
||||||
void delete(ResetPasswordDto dto);
|
int delete(ResetPasswordDto dto);
|
||||||
|
|
||||||
|
int passwordUpdate(ResetPasswordDto dto);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,10 @@ public class ResetPasswordService {
|
|||||||
mapper.insert(dto);
|
mapper.insert(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
void delete(ResetPasswordDto dto){
|
int delete(ResetPasswordDto dto){
|
||||||
mapper.delete(dto);
|
return mapper.delete(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int passwordUpdate(ResetPasswordDto dto){
|
||||||
|
return mapper.passwordUpdate(dto);}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.no1.wms.vendor;
|
package com.no1.wms.vendor;
|
||||||
|
|
||||||
|
import com.no1.wms.category.CategoryDto;
|
||||||
|
import com.no1.wms.excel.ExcelDownlodeUtils;
|
||||||
import com.no1.wms.warehouse.WarehouseDto;
|
import com.no1.wms.warehouse.WarehouseDto;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -7,6 +9,8 @@ import org.springframework.stereotype.Controller;
|
|||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -17,6 +21,9 @@ public class VendorController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
VendorService service;
|
VendorService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ExcelDownlodeUtils excelDownlodeUtils;
|
||||||
|
|
||||||
// 재고 리스트 출력
|
// 재고 리스트 출력
|
||||||
@GetMapping("vendor/list")
|
@GetMapping("vendor/list")
|
||||||
public String list(@RequestParam(name = "searchn", defaultValue = "0") int searchn,
|
public String list(@RequestParam(name = "searchn", defaultValue = "0") int searchn,
|
||||||
@@ -121,4 +128,22 @@ public class VendorController {
|
|||||||
int i = service.deleteVendor(id);
|
int i = service.deleteVendor(id);
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 엑셀다운로드테스트
|
||||||
|
@GetMapping("/vendor/downloadTest")
|
||||||
|
public void downloadExcelTest(HttpServletResponse response) {
|
||||||
|
List<VendorDto> dto = service.selectAll();
|
||||||
|
String excelFileName = "거래처 파일";
|
||||||
|
String sheetName = "거래처";
|
||||||
|
String[] columnName = {"업체명","대표자명","주소","사엄자등록번호","이메일","대표번호","거래처 담당자 이름","거래처 담당자 연락 번호","주요품목"};
|
||||||
|
excelDownlodeUtils.downloadVendorExcelFile(excelFileName, response, sheetName, columnName, dto);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
//서식 다운로드
|
||||||
|
@GetMapping("/vendor/downlodeVendorForm")
|
||||||
|
public void downlodeVendorForm (HttpServletResponse response) throws IOException {
|
||||||
|
String vendorFormName = "거래처 데이터 입력 서식.xlsx";
|
||||||
|
excelDownlodeUtils.downlodeExcelForm(response, vendorFormName);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface VendorMapper {
|
public interface VendorMapper {
|
||||||
|
List<VendorDto> selectAll();
|
||||||
List<VendorDto> list(Map<String, Object> m);
|
List<VendorDto> list(Map<String, Object> m);
|
||||||
|
|
||||||
int count(Map<String, Object> m);//검색 글 갯수
|
int count(Map<String, Object> m);//검색 글 갯수
|
||||||
|
|||||||
@@ -54,4 +54,8 @@ public class VendorService {
|
|||||||
public int deleteVendor(String id) {
|
public int deleteVendor(String id) {
|
||||||
return mapper.deleteVendor(id);
|
return mapper.deleteVendor(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<VendorDto> selectAll() {
|
||||||
|
return mapper.selectAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,14 +20,14 @@
|
|||||||
(UUID(), (SELECT id from account where employee_number = #{employeeNumber} ), #{note}, NOW())
|
(UUID(), (SELECT id from account where employee_number = #{employeeNumber} ), #{note}, NOW())
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="list" resultMap="resetPasswordResultMap" parameterType="map">
|
<select id="list" resultType="Map" parameterType="map">
|
||||||
SELECT
|
SELECT
|
||||||
rs.id as id,
|
rs.id as id,
|
||||||
rs.account_id as account_id,
|
rs.account_id as account_id,
|
||||||
rs.note as note,
|
rs.note as note,
|
||||||
rs.date as date,
|
rs.date as date,
|
||||||
acc.id,
|
acc.id,
|
||||||
acc.name as name,
|
acc.name,
|
||||||
acc.email as email,
|
acc.email as email,
|
||||||
acc.employee_number as employee_number
|
acc.employee_number as employee_number
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<when test="searchn == 1"> acc.activation = 1 and acc.employee_number like concat('%',#{search},'%') </when>
|
<when test="searchn == 1"> acc.activation = 1 and acc.employee_number like concat('%',#{search},'%') </when>
|
||||||
</choose>
|
</choose>
|
||||||
</where>
|
</where>
|
||||||
order by date desc limit #{start}, #{perPage}
|
order by rs.id desc limit #{start}, #{perPage}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="count" resultType="int" parameterType="map">
|
<select id="count" resultType="int" parameterType="map">
|
||||||
@@ -65,6 +65,14 @@
|
|||||||
order by acc.id desc limit #{start}, #{perPage}
|
order by acc.id desc limit #{start}, #{perPage}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="passwordUpdate" parameterType="resetPasswordDto">
|
||||||
|
update account a
|
||||||
|
left join reset_password rs on a.id = rs.account_id
|
||||||
|
set a.password = a.employee_number
|
||||||
|
where rs.id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="delete" parameterType="resetPasswordDto">
|
<delete id="delete" parameterType="resetPasswordDto">
|
||||||
delete from reset_password WHERE id = #{id}
|
delete from reset_password WHERE id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|||||||
@@ -4,6 +4,20 @@
|
|||||||
|
|
||||||
<mapper namespace="com.no1.wms.vendor.VendorMapper">
|
<mapper namespace="com.no1.wms.vendor.VendorMapper">
|
||||||
|
|
||||||
|
<select id="selectAll" resultType="VendorDto">
|
||||||
|
select
|
||||||
|
name,
|
||||||
|
president_name,
|
||||||
|
address,
|
||||||
|
registration_number,
|
||||||
|
email,
|
||||||
|
president_telephone,
|
||||||
|
vendor_manager,
|
||||||
|
vendor_manager_telephone,
|
||||||
|
main_product,
|
||||||
|
|
||||||
|
from vendor;
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="count" parameterType="map" resultType="java.lang.Integer">
|
<select id="count" parameterType="map" resultType="java.lang.Integer">
|
||||||
select count(name)
|
select count(name)
|
||||||
|
|||||||
@@ -12,7 +12,9 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
||||||
<input type='hidden' id="manager_id" value="83f11782-ae95-11ee-935d-0242ac110006">
|
|
||||||
|
<c:set var="userData" value="${sessionScope.userData}" />
|
||||||
|
<input type='hidden' id="manager_id" value="${userData.id }">
|
||||||
<input type='hidden' id="activation" value="1">
|
<input type='hidden' id="activation" value="1">
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<%@ page contentType="text/html; charset=UTF-8"%>
|
<%@ page contentType="text/html; charset=UTF-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -45,11 +46,8 @@
|
|||||||
aria-describedby="basic-addon1">
|
aria-describedby="basic-addon1">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 추후 수정 -->
|
<c:set var="userData" value="${sessionScope.userData}" />
|
||||||
<input type='hidden' id="manager_id" value="83bdda69-ae95-11ee-935d-0242ac110006">
|
<input type='hidden' id="manager_id" value="${userData.id }">
|
||||||
|
|
||||||
|
|
||||||
<!-- 추후 수정 -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -93,8 +91,8 @@ $(document).ready(function() {
|
|||||||
type: "post",
|
type: "post",
|
||||||
data: {
|
data: {
|
||||||
"price": price,
|
"price": price,
|
||||||
"manager_id": manager_id, // 추후 수정해야함.
|
"manager_id": manager_id,
|
||||||
"product_id": product_id, // 추후 수정해야함.
|
"product_id": product_id,
|
||||||
"activation": true
|
"activation": true
|
||||||
},
|
},
|
||||||
datatype:"json"
|
datatype:"json"
|
||||||
@@ -102,24 +100,6 @@ $(document).ready(function() {
|
|||||||
if (data == true) {
|
if (data == true) {
|
||||||
alert("제품 가격을 추가했습니다.");
|
alert("제품 가격을 추가했습니다.");
|
||||||
$(location).attr("href", "/price/list");
|
$(location).attr("href", "/price/list");
|
||||||
|
|
||||||
|
|
||||||
//생각해서 바꿔야함.
|
|
||||||
// 조건 : DB에서 생성되는 uuid를 어떻게 자바스크립트에서 가져올것인지 궁리.
|
|
||||||
/*
|
|
||||||
var form = document.createElement("form");
|
|
||||||
form.action = "/product/read";
|
|
||||||
form.method = "POST";
|
|
||||||
document.body.appendChild(form);
|
|
||||||
|
|
||||||
var input = document.createElement("input");
|
|
||||||
input.type = "hidden";
|
|
||||||
input.name = "id";
|
|
||||||
input.value = data.id;
|
|
||||||
form.appendChild(input);
|
|
||||||
|
|
||||||
form.submit();
|
|
||||||
*/
|
|
||||||
} else {
|
} else {
|
||||||
alert("제품 가격 추가에 실패하였습니다.");
|
alert("제품 가격 추가에 실패하였습니다.");
|
||||||
}
|
}
|
||||||
@@ -153,8 +133,5 @@ function showSearchModal(title, val){
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<%@ page contentType="text/html; charset=UTF-8"%>
|
<%@ page contentType="text/html; charset=UTF-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -34,14 +35,15 @@
|
|||||||
<input type="text" class="form-control" placeholder="등록날짜"
|
<input type="text" class="form-control" placeholder="등록날짜"
|
||||||
aria-label="등록날짜" value="${dto.registration_date }" readonly>
|
aria-label="등록날짜" value="${dto.registration_date }" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
<c:set var="userData" value="${sessionScope.userData}" />
|
||||||
<div class="input-group mb-3 w-40 col-centered">
|
<div class="input-group mb-3 w-40 col-centered">
|
||||||
<span class="input-group-text" id="basic-addon4">담당자</span>
|
<span class="input-group-text" id="basic-addon4">담당자</span>
|
||||||
<input type="text" class="form-control" placeholder="담당자"
|
<input type="text" class="form-control" placeholder="담당자"
|
||||||
aria-label="담당자" value="${dto.accountDto.name }" readonly>
|
aria-label="담당자" value="${userData.name }" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type='hidden' id="id" value="${dto.id }">
|
<input type='hidden' id="id" value="${dto.id }">
|
||||||
|
<input type='hidden' id="manager_id" value="${userData.id }">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -62,6 +64,7 @@
|
|||||||
$("#submitBtn").on("click", function() {
|
$("#submitBtn").on("click", function() {
|
||||||
var id = $("#id").val();
|
var id = $("#id").val();
|
||||||
var price = $("#price").val();
|
var price = $("#price").val();
|
||||||
|
var manager_id = $("#manager_id").val();
|
||||||
|
|
||||||
if (!price || isNaN(price)) {
|
if (!price || isNaN(price)) {
|
||||||
alert("올바른 가격을 입력하세요.");
|
alert("올바른 가격을 입력하세요.");
|
||||||
@@ -74,7 +77,8 @@
|
|||||||
type: "put",
|
type: "put",
|
||||||
data: {
|
data: {
|
||||||
"id": id,
|
"id": id,
|
||||||
"price": price
|
"price": price,
|
||||||
|
"manager_id": manager_id
|
||||||
},
|
},
|
||||||
datatype: "json"
|
datatype: "json"
|
||||||
}).done(function(data) {
|
}).done(function(data) {
|
||||||
|
|||||||
@@ -63,10 +63,8 @@
|
|||||||
<input type='hidden' id="vendor_id" value="">
|
<input type='hidden' id="vendor_id" value="">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 추후 수정 -->
|
<c:set var="userData" value="${sessionScope.userData}" />
|
||||||
<input type='hidden' id="manager_id" value="83bdda69-ae95-11ee-935d-0242ac110006">
|
<input type='hidden' id="manager_id" value="${userData.id }">
|
||||||
|
|
||||||
<!-- 추후 수정 -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -81,7 +79,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 스크립트 -->
|
<!-- 스크립트 -->
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<%@ page contentType="text/html; charset=UTF-8"%>
|
<%@ page contentType="text/html; charset=UTF-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -59,10 +60,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type='hidden' id="id" value="${dto.id }">
|
<input type='hidden' id="id" value="${dto.id }">
|
||||||
<!-- 추후 수정 -->
|
<c:set var="userData" value="${sessionScope.userData}" />
|
||||||
<input type='hidden' id="manager_id" value="83bdda69-ae95-11ee-935d-0242ac110006">
|
<input type='hidden' id="manager_id" value="${userData.id }">
|
||||||
|
|
||||||
<!-- 추후 수정 -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,7 +22,8 @@
|
|||||||
<option value="1">사번</option>
|
<option value="1">사번</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" id="search" name="search" class="form-control" aria-label="Text input with dropdown button" placeholder="검색어를 입력하세요">
|
<input type="text" id="search" name="search" class="form-control"
|
||||||
|
aria-label="Text input with dropdown button" placeholder="검색어를 입력하세요">
|
||||||
<button class="btn btn-info" type="button" id="searchBtn">검색</button>
|
<button class="btn btn-info" type="button" id="searchBtn">검색</button>
|
||||||
|
|
||||||
<!-- 페이징작업용 -->
|
<!-- 페이징작업용 -->
|
||||||
@@ -56,8 +57,13 @@
|
|||||||
<td class="col-1">${dto.email }</td>
|
<td class="col-1">${dto.email }</td>
|
||||||
<td class="col-1">${dto.note }</td>
|
<td class="col-1">${dto.note }</td>
|
||||||
<td class="col-1">
|
<td class="col-1">
|
||||||
<button type="button" class="btn btn-primary" value="${dto.id}" id="resetpassword">확인</button>
|
<button type="button" class="btn btn-primary" data-resetpassword="${dto.id}"
|
||||||
<button type="button" class="btn btn-warning" value="${dto.id}" id="cancelrequest">취소</button>
|
id="resetpassword">확인
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btn btn-warning" data-resetpasswordDelete="${dto.id}"
|
||||||
|
id="resetpasswordDelete">취소
|
||||||
|
</button>
|
||||||
|
<input type="hidden" id="id" value="${dto.id}"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
@@ -69,31 +75,35 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row row-buttons">
|
<div class="row row-buttons">
|
||||||
|
|
||||||
<div class="col-6 d-flex justify-content-center">
|
<div class="col-12 d-flex justify-content-center">
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
|
|
||||||
<c:if test="${begin > pageNum }">
|
<c:if test="${begin > pageNum }">
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="javascript:void(0);" class="page-link" id="before"
|
<a href="javascript:void(0);" class="page-link"
|
||||||
value="${begin - 1 }"><</a>
|
onclick="pageingFunction(this.id)" id="${begin - 1 }"><</a>
|
||||||
</li>
|
</li>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:forEach begin="${begin }" end="${end }" var="i">
|
<c:forEach begin="${begin }" end="${end }" var="i">
|
||||||
<li class="page-item <c:if test="${p == i}"> active </c:if>">
|
<li class="page-item <c:if test="${p == i}"> active </c:if>">
|
||||||
<a href="javascript:void(0);" class="page-link " id="pageNow"
|
<a href="javascript:void(0);" class="page-link "
|
||||||
value="${i }">${i }</a>
|
onclick="pageingFunction(this.id); return false;" id="${i }">${i }</a>
|
||||||
</li>
|
</li>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
<c:if test="${end < totalPages }">
|
<c:if test="${end < totalPages }">
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a href="javascript:void(0);" class="page-link" id="after" value="${end + 1 }">></a>
|
<a href="javascript:void(0);" class="page-link"
|
||||||
|
onclick="pageingFunction(this.id)" id="${end + 1 }">></a>
|
||||||
</li>
|
</li>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" value="${p}" id="p"/>
|
||||||
|
|
||||||
</div><!-- row row-buttons -->
|
</div><!-- row row-buttons -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -101,76 +111,73 @@
|
|||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#resetpassword").on("click", function(){
|
$("#resetpassword").on("click", function(){
|
||||||
var resetpassword = $("#resetpassword").val();
|
var id = $("#id").val();
|
||||||
|
$.ajax({
|
||||||
|
url: "/resetpassword/update",
|
||||||
|
type: "put",
|
||||||
|
data: {
|
||||||
|
"id": id,
|
||||||
|
},
|
||||||
|
datatype:"json"
|
||||||
|
}).done(function (data) {
|
||||||
|
if (data == true) {
|
||||||
|
alert("비밀번호를 초기화했습니다.");
|
||||||
var form = document.createElement("form");
|
var form = document.createElement("form");
|
||||||
form.action = "/resetpassword/list";
|
form.action = "/resetpassword/list";
|
||||||
form.method = "get";
|
form.method = "get";
|
||||||
|
|
||||||
var input1 = document.createElement("input");
|
// var input1 = document.createElement("input");
|
||||||
input1.type = "hidden";
|
// input1.type = "hidden";
|
||||||
input1.name = "searchn";
|
// input1.name = "id";
|
||||||
input1.value = searchn;
|
// input1.value = id;
|
||||||
form.appendChild(input1);
|
// form.appendChild(input1);
|
||||||
|
|
||||||
var input2 = document.createElement("input");
|
|
||||||
input2.type = "hidden";
|
|
||||||
input2.name = "search";
|
|
||||||
input2.value = search;
|
|
||||||
form.appendChild(input2);
|
|
||||||
|
|
||||||
var input3 = document.createElement("input");
|
|
||||||
input3.type = "hidden";
|
|
||||||
input3.name = "p";
|
|
||||||
input3.value = pageNow;
|
|
||||||
form.appendChild(input3);
|
|
||||||
|
|
||||||
var input4 = document.createElement("input");
|
|
||||||
input4.type = "hidden";
|
|
||||||
input4.name = "resetpassword";
|
|
||||||
input4.value = resetpassword;
|
|
||||||
form.appendChild(input4);
|
|
||||||
|
|
||||||
document.body.appendChild(form);
|
|
||||||
form.submit();
|
form.submit();
|
||||||
|
window.location.href = "/resetpassword/list";
|
||||||
|
} else {
|
||||||
|
alert("비밀번호를 초기화를 실패했습니다..");
|
||||||
|
}
|
||||||
|
}).fail(function () {
|
||||||
|
alert("오류가 발생했습니다.");
|
||||||
|
}).always(function () {
|
||||||
|
//
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#cancelrequest").on("click",function(){
|
$("#resetpasswordDelete").on("click", function(){
|
||||||
var cancelrequest = $("#cancelrequest").val();
|
var id = $("#id").val();
|
||||||
|
$.ajax({
|
||||||
|
url: "/resetpassword/delete",
|
||||||
|
type: "delete",
|
||||||
|
data: {
|
||||||
|
"id": id,
|
||||||
|
},
|
||||||
|
datatype:"json"
|
||||||
|
}).done(function (data) {
|
||||||
|
if (data == true) {
|
||||||
|
alert("요청을 거절하였습니다.");
|
||||||
var form = document.createElement("form");
|
var form = document.createElement("form");
|
||||||
form.action = "/resetpassword/list";
|
form.action = "/resetpassword/list";
|
||||||
form.method = "get";
|
form.method = "get";
|
||||||
|
|
||||||
var input1 = document.createElement("input");
|
// var input1 = document.createElement("input");
|
||||||
input1.type = "hidden";
|
// input1.type = "hidden";
|
||||||
input1.name = "searchn";
|
// input1.name = "id";
|
||||||
input1.value = searchn;
|
// input1.value = id;
|
||||||
form.appendChild(input1);
|
// form.appendChild(input1);
|
||||||
|
|
||||||
var input2 = document.createElement("input");
|
|
||||||
input2.type = "hidden";
|
|
||||||
input2.name = "search";
|
|
||||||
input2.value = search;
|
|
||||||
form.appendChild(input2);
|
|
||||||
|
|
||||||
var input3 = document.createElement("input");
|
|
||||||
input3.type = "hidden";
|
|
||||||
input3.name = "p";
|
|
||||||
input3.value = 1;
|
|
||||||
form.appendChild(input3);
|
|
||||||
|
|
||||||
var input4 = document.createElement("input");
|
|
||||||
input4.type = "hidden";
|
|
||||||
input4.name = "cancelrequest";
|
|
||||||
input4.value = cancelrequest;
|
|
||||||
form.appendChild(input4);
|
|
||||||
|
|
||||||
document.body.appendChild(form);
|
|
||||||
form.submit();
|
form.submit();
|
||||||
|
window.location.href = "/resetpassword/list";
|
||||||
|
} else {
|
||||||
|
alert("거절을 실패했습니다..");
|
||||||
|
}
|
||||||
|
}).fail(function () {
|
||||||
|
alert("오류가 발생했습니다.");
|
||||||
|
}).always(function () {
|
||||||
|
//
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//검색기능
|
//검색기능
|
||||||
@@ -207,11 +214,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});//ready
|
});//ready
|
||||||
$("#before, #pageNow, #after").on("click", function () {
|
function pageingFunction(clickedId) {
|
||||||
var searchn = $("#searchn1").val();
|
var searchn1 = $("#searchn1").val();
|
||||||
var search = $("#search1").val();
|
var search1 = $("#search1").val();
|
||||||
|
|
||||||
var form = document.createElement("form");
|
var form = document.createElement("form");
|
||||||
form.action = "/resetpassword/list";
|
form.action = "/resetpassword/list";
|
||||||
@@ -220,25 +226,24 @@
|
|||||||
var input1 = document.createElement("input");
|
var input1 = document.createElement("input");
|
||||||
input1.type = "hidden";
|
input1.type = "hidden";
|
||||||
input1.name = "searchn";
|
input1.name = "searchn";
|
||||||
input1.value = searchn;
|
input1.value = searchn1;
|
||||||
form.appendChild(input1);
|
form.appendChild(input1);
|
||||||
|
|
||||||
var input2 = document.createElement("input");
|
var input2 = document.createElement("input");
|
||||||
input2.type = "hidden";
|
input2.type = "hidden";
|
||||||
input2.name = "search";
|
input2.name = "search";
|
||||||
input2.value = search;
|
input2.value = search1;
|
||||||
form.appendChild(input2);
|
form.appendChild(input2);
|
||||||
|
|
||||||
var input3 = document.createElement("input");
|
var input3 = document.createElement("input");
|
||||||
input3.type = "hidden";
|
input3.type = "hidden";
|
||||||
input3.name = "p1";
|
input3.name = "p";
|
||||||
input3.value = clickedId;
|
input3.value = clickedId;
|
||||||
form.appendChild(input3);
|
form.appendChild(input3);
|
||||||
|
|
||||||
|
|
||||||
document.body.appendChild(form);
|
document.body.appendChild(form);
|
||||||
form.submit();
|
form.submit();
|
||||||
});
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -37,7 +37,8 @@
|
|||||||
|
|
||||||
<%-- 세션 만들어지고 value 수정--%>
|
<%-- 세션 만들어지고 value 수정--%>
|
||||||
|
|
||||||
<input type='hidden' id="manager_id" value="15b68e54-b0f0-11ee-935d-0242ac110006"/>
|
<c:set var="userData" value="${sessionScope.userData}" />
|
||||||
|
<input type='hidden' id="manager_id" value="${userData.id }">
|
||||||
<input type='hidden' id="activation" value="1">
|
<input type='hidden' id="activation" value="1">
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
10
src/main/webapp/WEB-INF/views/vendor/list.jsp
vendored
10
src/main/webapp/WEB-INF/views/vendor/list.jsp
vendored
@@ -69,7 +69,7 @@
|
|||||||
<div class="row row-buttons">
|
<div class="row row-buttons">
|
||||||
<div class="col-3 text-start">
|
<div class="col-3 text-start">
|
||||||
<img width="50" height="50" src="https://img.icons8.com/color/48/ms-excel.png" alt="ms-excel"/>
|
<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="uploadExcel">업로드</button>
|
<button type="button" class="btn btn-success" id="downlodeExcelForm">업로드</button>
|
||||||
<button type="button" class="btn btn-success" id="download">다운로드</button>
|
<button type="button" class="btn btn-success" id="download">다운로드</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 d-flex justify-content-center">
|
<div class="col-6 d-flex justify-content-center">
|
||||||
@@ -106,6 +106,14 @@
|
|||||||
|
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
$("#downlodeExcelForm").on("click",function(){
|
||||||
|
var form = document.createElement("form");
|
||||||
|
form.action = "/vendor/downloadTest";
|
||||||
|
form.method = "GET";
|
||||||
|
document.body.appendChild(form);
|
||||||
|
form.submit();
|
||||||
|
});
|
||||||
|
|
||||||
//POST방식으로 create폼화면 출력
|
//POST방식으로 create폼화면 출력
|
||||||
$("#createButton").on("click",function(){
|
$("#createButton").on("click",function(){
|
||||||
var form = document.createElement("form");
|
var form = document.createElement("form");
|
||||||
|
|||||||
@@ -36,7 +36,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<%-- 세션 만들어지고 value 수정--%>
|
<%-- 세션 만들어지고 value 수정--%>
|
||||||
<input type='hidden' id="managerId" value="e9882095-aeb2-11ee-935d-0242ac110006">
|
<c:set var="userData" value="${sessionScope.userData}"/>
|
||||||
|
<input type='hidden' id="manager_id" value="${userData.id }">
|
||||||
<input type='hidden' id="currentCapacity" value="0">
|
<input type='hidden' id="currentCapacity" value="0">
|
||||||
<input type='hidden' id="activation" value="1">
|
<input type='hidden' id="activation" value="1">
|
||||||
|
|
||||||
|
|||||||
BIN
src/main/webapp/excelfiles/excelform/거래처 데이터 입력 서식.xlsx
Normal file
BIN
src/main/webapp/excelfiles/excelform/거래처 데이터 입력 서식.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user