Leeyh1121 5 months ago
commit 4df015aae3

@ -19,7 +19,7 @@ public class DisposeProcessDetails extends HWPFormat {
public DisposeProcessDetails(Print print, PrintOption printOption, List<DataObject> dataObjectList, List<String> afterPhotoPaths) {
super(print, printOption, dataObjectList);
this.print.setFormatKorName("폐기처리내역");
this.print.setFormatKorName("폐기처리내역및사진");
this.print.setFormatName("disposeProcessDetails");
this.maxRunCount = 1;

@ -58,18 +58,19 @@ public class AddsNimsController extends ApplicationController {
@RequestMapping(value = "/dsuseMgtReceipt-info.do", name="신청서 접수 상세")
public ModelAndView getDsuseMgtReceiptInfo(DsuseRsltInfo dsuseReceptInfo) {
ModelAndView mav = new ModelAndView();
ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtReceipt-info");
setCmmCode("ADDS04", mav);
if(!isEmpty(dsuseReceptInfo) && !isEmpty(dsuseReceptInfo.getDscdmngId())){
mav.setViewName("adds/nims/dsuseMgtReceiptMain-detail");
//mav.setViewName("adds/nims/dsuseMgtReceiptMain-detail");
mav.addObject("dsuseReceptInfo", toJson(dsuseReceptInfo));
// DsuseMgtReceiptQuery query = new DsuseMgtReceiptQuery();
// query.setDscdmngId(dscdmngId);
// mav.addObject("dsuseReceptDetails", toJson(dsuseMgtReceiptService.getDsuseMgtReceiptList(query)));
}else{
mav.setViewName("adds/nims/dsuseMgtReceipt-info");
}
// else{
// mav.setViewName("adds/nims/dsuseMgtReceipt-info");
// }
return mav
.addObject("pageName", "dsuseMgtReceiptInfo") // View(jsp)에서 사용할 id 뒤에 붙일 suffix

@ -49,6 +49,8 @@ propertyService:
- pageSize: 10
# 테스트를 위해 permitAccess 설정
- permitAccess: /intf/**/*
- defaultPassword: 0
# extFileName:
# - encoding: UTF-8
# filename: classpath*:properties/your-file-01.properties
@ -76,6 +78,7 @@ spring:
propertyService:
properties:
- tempDir: C:\temppp
- defaultPassword: 0
app:
api:
@ -105,6 +108,7 @@ server:
propertyService:
properties:
- tempDir: C:\temp
- defaultPassword: 0
app:
api:

@ -85,12 +85,12 @@ SELECT USER_ID
<select id="getUser" parameterType="map" resultMap="userRow">/* 사용자 계정 가져오기(userMapper.getUser) */
SELECT *
FROM TB_USER
WHERE USER_ACNT = #{account}
AND NSTT_CD = #{institute}</select>
<where><if test="userID != null">AND USER_ID = #{userID}</if>
<if test="account != null">AND USER_ACNT = #{account}</if>
<if test="institute != null"> AND NSTT_CD = #{institute}</if></where></select>
<insert id="insertUser" parameterType="cokr.xit.base.user.ManagedUser">
<insert id="insertUser" parameterType="cokr.xit.base.user.ManagedUser">/* 사용자 정보 등록(userMapper.insertUser) */
<selectKey resultType="string" keyProperty="id" keyColumn="NEW_ID" order="BEFORE">SELECT LPAD(NVL(MAX(USER_ID) + 1, 1), 10, '0') NEW_ID FROM TB_USER</selectKey>
/* 사용자 정보 등록(userMapper.insertUser) */
INSERT INTO TB_USER (
USER_ID
, USER_ACNT
@ -187,8 +187,8 @@ UPDATE TB_USER SET
WHERE USER_ID = #{id}</update>
<update id="changePassword" parameterType="map">/* 비밀번호 변경(userMapper.changePassword) */
UPDATE TB_USER SET
PASSWD = CASE USER_ID<foreach collection="userPasswords" item="userPassword" separator=" ">
UPDATE TB_USER
SET PASSWD = CASE USER_ID<foreach collection="userPasswords" item="userPassword" separator=" ">
WHEN #{userPassword.userID} THEN #{userPassword.password}</foreach>
ELSE PASSWD END
, MDFCN_DT =<include refid="utility.now" />

@ -16,7 +16,8 @@
<label for="bsshCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">취급자번호</label>
<input type="text" class="form-control w-60" id="bsshNm--${pageName}" name="schBsshCd" data-map="BSSH_CD" >
</div>
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색">검색</button>
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색">검색</button>&nbsp;
<button type="button" class="btn btn-primary w-px-120" id="btnSearch2--${pageName}" title="검색">NIMS 검색</button>
</div>
</div>
</form>
@ -92,7 +93,6 @@
**************************************************************************/
$P.control = new DatasetControl({
urls : {
//load : wctx.url("/adds/nims/bssh-list.do")
load : '<c:url value="${apiHost}/api/biz/nims/v1/getNimsBsshInfoSt" />',
}
, prefix: "bsshPopup"
@ -110,7 +110,7 @@
});
// $P.control 설정
$P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.defaultFetchSize = FETCH_XXL; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.untilPageNum = 0; // 현재 페이지 번호
$P.control.beforeCurrent = null;
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 완료 여부
@ -179,10 +179,10 @@
let noMore = (totalSize == ${infoPrefix}List.length);
let initScroll = ($P.control.query.pageNum < 2) && ($P.control.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
$("#tbody--${pageName}").html(trs.join());
if ($P.control.untilPageNum != 0) {
$P.control.query.fetchSize = $P.control.defaultFetchSize;
$P.control.query.fetchSize = FETCH_XXL;
$P.control.query.pageNum = $P.control.untilPageNum;
$P.control.untilPageNum = 0;
}
@ -196,17 +196,17 @@
* 버튼 clickEvent
**************************************************************************/
$P.fnSearchList = () => {
$P.fnSearchList = (dbSkipYn) => {
// 검색조건
// FIXME: 업체명 또는 식별번호중 하나는 필수
$P.control.query = {
... $P.formFields.get(),
bc: $P.formFields.get().schBsshCd,
bn: $P.formFields.get().schBsshNm,
dbSkipYn: "N",
dbSkipYn: dbSkipYn? dbSkipYn : "N",
userId: "${currentUser.account}"
};
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수
$P.control.query.fetchSize = FETCH_XXL; // 한번에 조회되는 자료 건수
$P.control.query.delYn = "N"; // 삭제 여부
$P.control.load(1);
@ -214,7 +214,6 @@
// 저장
$P.fnSave = () => {
console.log("#${openPage}");
dialog.alert({
content: "현재 " + $P.control.prefixName + " 정보를 선택 하시겠습니까?"
, init: () => { setDialogZindex(); }
@ -234,18 +233,14 @@
// 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList());
$("#btnSearch2--${pageName}").on("click", () => $P.fnSearchList("Y"));
}
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
// DataTables 스크롤 이벤트 생성
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
// 초기 화면 설정
$P.initForm = () => {
}
$P.initForm = () => {}
/**************************************************************************
* 최초 실행 함수
@ -255,9 +250,6 @@
// 2. 초기 화면 설정
$P.initForm();
// 3. Dataset 설정
//$P.control.setData([${opnnDlbrMbrInfo}]);
});
</script>

@ -65,11 +65,11 @@
</div>
</div>
<div>
<button type="button" class="btn btn-primary w-px-120" id="btnCreateDsuseMGT--${pageName}" title="폐기 결과 통보서 출력">
폐기 결과 통보서 출력
<button type="button" class="btn btn-primary w-px-120" id="btnCreateDsuseRsltDoc--${pageName}" title="폐기 결과 보고서 생성">
폐기 결과 보고서 생성
</button>
<button type="button" class="btn btn-primary w-px-120" id="btnCreateDsuseMGT--${pageName}" title="폐기 결과 보고서 출력">
폐기 결과 보고서 출력
<button type="button" class="btn btn-primary w-px-120" id="btnCreateDsuseRsltListPhoto--${pageName}" title="폐기 처리 내역 및 사진 생성">
폐기 처리 내역 및 사진 생성
</button>
<button type="button" class="btn btn-excel w-px-120" id="btnExcel--${pageName}" title="엑셀">
엑셀
@ -78,62 +78,66 @@
</div>
<!-- DataTables(그리드) -->
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr id="theadTr--${pageName}"
data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th class="cmn" style="width: 72px;">No.</th>
<th class="cmn" style="width: 130.141px;">폐기관리번호</th>
<th class="cmn" style="width: 120.141px;">취급일자</th>
<th class="cmn" style="width: 120.469px;">폐기일자</th>
<th class="cmn" style="width: 250.469px;">업체명</th>
<th class="cmn" style="width: 90px;">폐기건수</th>
<th class="cmn" style="width: 170.469px;">처리상태</th>
<th class="cmn" style="width: 150.469px;">폐기결과보고서</th>
<th class="cmn" style="width: 170.469px;">폐기처리내역및사진</th>
<th class="cmn" style="width: 180.469px;">폐기사유</th>
<th class="cmn" style="width: 150px;">폐기구분</th>
<th class="cmn" style="width: 150px;">폐기방법</th>
<th class="cmn" style="width: 200.469px;">폐기장소</th>
</tr>
</thead>
<tbody id="tbody--${pageName}">
</tbody>
<template id="${infoPrefix}Row--${pageName}">
<tr data-key="dscdmng_id">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dscdmng_id}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{hdr_de}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_de}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{bssh_nm}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{rnd_dtl_rpt_cnt}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prgrs_stts_nm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_rslt_doc}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_rslt_list_photo}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_prv_nm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_se_nm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_mth_nm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_loc}</td>
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}">
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead">
<tr id="theadTr--${pageName}"
data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th class="cmn" style="width: 72px;">No.</th>
<th class="cmn" style="width: 130.141px;">폐기관리번호</th>
<th class="cmn" style="width: 120.141px;">취급일자</th>
<th class="cmn" style="width: 120.469px;">폐기일자</th>
<th class="cmn" style="width: 250.469px;">업체명</th>
<th class="cmn" style="width: 90px;">폐기건수</th>
<th class="cmn" style="width: 170.469px;">처리상태</th>
<th class="cmn" style="width: 150.469px;">폐기결과보고서</th>
<th class="cmn" style="width: 170.469px;">폐기처리내역및사진</th>
<th class="cmn" style="width: 180.469px;">폐기사유</th>
<th class="cmn" style="width: 150px;">폐기구분</th>
<th class="cmn" style="width: 150px;">폐기방법</th>
<th class="cmn" style="width: 200.469px;">폐기장소</th>
</tr>
</thead>
<tbody id="tbody--${pageName}">
</tbody>
<template id="${infoPrefix}Row--${pageName}">
<tr data-key="{dscdmng_id}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dscdmng_id}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{hdr_de}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_de}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{bssh_nm}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{rnd_dtl_rpt_cnt}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prgrs_stts_nm}</td>
<td class="cmn text-center" onclick="{onclick}">
<a href="/file/download.do?fileID={dsuse_rslt_doc}">{dsuse_rslt_doc}</a>
</td>
<td class="cmn text-center" onclick="{onclick}">
<a href="/file/download.do?fileID={dsuse_rslt_list_photo}">{dsuse_rslt_list_photo}</a>
</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_prv_nm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_se_nm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_mth_nm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_loc}</td>
<%-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{USR_RPT_ID_NO}</td>--%>
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}">
<tr class="odd">
<td valign="top" colspan="13" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div>
<!-- / DataTables(그리드) -->
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}">
<tr class="odd">
<td valign="top" colspan="13" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div>
<!-- / DataTables(그리드) -->
<div class="d-flex flex-row p-3 justify-content-between">
<label id="userPagingInfo" class="dataTables_info" role="status" aria-live="polite">1 ~ 2 / 2</label>
<ul id="userPaging" class="pagination pagination-primary" style="display: none;">
<label id="${infoPrefix}Paging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
<ul id="${infoPrefix}Paging--${pageName}" class="pagination pagination-primary" style="display: none;">
</ul>
</div>
@ -185,10 +189,10 @@
// Dataset 변경 이벤트
$P.control.onDatasetChange = (obj) => {
$P.renderList(obj.${infoPrefix}Total);
$("#paging--${pageName}").setPaging({
$("#${infoPrefix}Paging--${pageName}").setPaging({
list: $P.control.dataset
, prefix: "paging--${pageName}"
, prefix: "${infoPrefix}Paging--${pageName}"
, start: obj.${infoPrefix}Start
, totalSize: obj.${infoPrefix}Total
, fetchSize: obj.${infoPrefix}Fetch
@ -200,9 +204,16 @@
// 현재 선택 자료 변경 이벤트
$P.control.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.LEVY_EXCL_ID;
if (!item) {
$("#btnCreateDsuseRsltDoc--${pageName}").prop("disabled", true);
$("#btnCreateDsuseRsltListPhoto--${pageName}").prop("disabled", true);
return;
}
$("#btnCreateDsuseRsltDoc--${pageName}").prop("disabled", false);
$("#btnCreateDsuseRsltListPhoto--${pageName}").prop("disabled", false);
let key = item.data.dscdmng_id;
$("#tbody--${pageName}").setCurrentRow(key);
};
@ -253,10 +264,7 @@
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
let noMore = (totalSize == ${infoPrefix}List.length);
let initScroll = ($P.control.query.pageNum < 2) && ($P.control.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
$("#tbody--${pageName}").html(trs.join());
if ($P.control.untilPageNum != 0) {
$P.control.query.fetchSize = $P.control.defaultFetchSize;
@ -266,12 +274,6 @@
}
// DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트
$P.scrollDataList = () => {
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 false
$P.control.load($P.control.query.pageNum + 1);
}
$P.control.getBsshInfo = (gdccId) => {
let dialogTitle = "마약류 취급자 조회";
@ -310,9 +312,38 @@
$("#schRgtrNm--${pageName}").val(userNm); // 사용자 명
}
// 전자우편 안내문 등록 버튼 이벤트
$P.fnCreateEpostGdcc = (title) => {
$P.control.getInfo();
//문서 생성 버튼 이벤트
$P.fnCreateDoc = (ADDS12) => {
let url = "";
let docName = "";
if(ADDS12 == "01"){
url = wctx.url("/doc/makeDisposeResultReportHwp.do");
docName = "폐기결과보고서";
} else if(ADDS12 == "02"){
url = wctx.url("/doc/makeDisposeProcessDetailsHwp.do");
docName = "폐기처리내역";
} else {
return;
}
dialog.alert({
content: "선택한 폐기관리 정보로 "+ docName+" 파일을 생성 하시겠습니까?"
, init: () => { setDialogZindex(); }
, onOK: () => {
let dscdmngId = $P.control.getCurrent().dscdmngId;
ajax.get({
url: url,
data: { dscdmngId : dscdmngId },
success:resp => {
//$P.control.load($P.control.pageNum);
}
});
}
});
}
// 전자우편 안내문 등록 버튼 이벤트
@ -382,9 +413,13 @@
}
});
// 안내문 등록 버튼 이벤트
$("#btnCreateDsuseMGT--${pageName}").on("click", function() {
$P.fnCreateEpostGdcc($(this).attr("title"));
// 폐기결과보고서 생성 버튼 이벤트
$("#btnCreateDsuseRsltDoc--${pageName}").on("click", function() {
$P.fnCreateDoc("01");
});
// 폐기처리내역및사진 생성 버튼 이벤트
$("#btnCreateDsuseRsltListPhoto--${pageName}").on("click", function() {
$P.fnCreateDoc("02");
});
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
@ -408,8 +443,6 @@
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
// DataTables 스크롤 이벤트 생성
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
}
// 초기 화면 설정

@ -163,7 +163,7 @@
</template>
<template id="${infoPrefix}NotFound--${pageName}Mapping">
<tr class="odd">
<td valign="top" colspan="13" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
<td valign="top" colspan="13" class="dataTables_empty text-center">폐기 보고 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
@ -490,7 +490,7 @@
//if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
dialog.alert({
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
content: "현재 폐기 보고 확인 정보를 저장하시겠습니까?"
, init: () => { setDialogZindex(); }
, onOK: () => {
$P.control.save(); // formFields

@ -66,7 +66,7 @@
</div>
<div>
<button type="button" class="btn btn-primary w-px-120" id="btnCreateDsuseMgtMapping--${pageName}" title="폐기 보고 맵핑">
폐기 보고 맵핑
NIMS 폐기 보고 확인
</button>
<button type="button" class="btn btn-excel w-px-120" id="btnExcel--${pageName}" title="엑셀">
엑셀
@ -139,8 +139,10 @@
<th class="cmn" style="width: 72px;">No.</th>
<th class="sorting sorting_asc" aria-sort="ascending" style="width: 350.719px;">제품명</th>
<th class="sorting" style="width: 146.156px;">제품코드</th>
<th class="sorting" style="width: 130.141px;">폐기수량</th>
<th class="sorting" style="width: 90.141px;">폐기수량</th>
<th class="sorting" style="width: 130.469px;">유효기간</th>
<th class="sorting" style="width: 160.469px;">제조번호</th>
<th class="sorting" style="width: 160.469px;">일련번호</th>
<th class="sorting" style="width: 180.469px;">유통단위 수량</th>
<th class="sorting" style="width: 180.469px;">낱개단위 수량</th>
</tr>
@ -154,6 +156,8 @@
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRDUCT_CD}</td>
<td class="text-end" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_QY} {PCE_UNIT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRD_VALID_DE}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MNF_NO}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MNF_SEQ}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MIN_DISTB_QY} {MIN_DISTB_UNIT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PCE_QY} {PCE_UNIT}</td>
</tr>
@ -210,7 +214,7 @@
}
});
// $P.control 설정
$P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.defaultFetchSize = FETCH_XXS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.untilPageNum = 0; // 현재 페이지 번호
$P.control.beforeCurrent = null;
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 완료 여부

@ -64,15 +64,15 @@
</div>
<div class="col-md-4">
<label for="prdlstMstCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 번호</label>
<input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="mnfNo" data-map="mnfNo" readonly>
<input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="mnfNo" data-map="mnfNo">
</div>
<div class="col-md-4">
<label for="prdlstMstCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제조 일련 번호</label>
<input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="mnfSeq" data-map="mnfSeq" readonly>
<input type="text" class="form-control w-60" id="prdlstMstCd--${pageName}" name="mnfSeq" data-map="mnfSeq">
</div>
<div class="col-md-4">
<label for="rgsDt--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">유효기간</label>
<input type="text" class="form-control w-60" id="rgsDt--${pageName}" name="prdValidDe" data-map="prdValidDe" readonly>
<input type="text" class="form-control w-60" id="rgsDt--${pageName}" name="prdValidDe" data-map="prdValidDe">
</div>
<div class="col-md-4">
<label for="prdMinDistbQy--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">최소 유통단위 수량</label>
@ -94,8 +94,8 @@
<span class="container-page-btn">
<span class="container-window-btn-right">
<!-- 업무 버튼 -->
<button type="button" class="btn btn-primary w-px-80" id="btnAdd--${pageName}" title="저장">추가</button>
<button type="button" class="btn btn-primary w-px-80" id="btnDel--${pageName}" title="저장">제거</button>
<button type="button" class="btn btn-primary w-px-80" id="btnAdd--${pageName}" title="추가">추가</button>
<button type="button" class="btn btn-primary w-px-80" id="btnDel--${pageName}" title="삭제">삭제</button>
</span>
</span>
</div>
@ -120,16 +120,16 @@
<tbody id="tbody--productList">
</tbody>
<template id="productListRow--productList">
<tr data-key="{prductCd}">
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prductCd}</td>
<td {onclick}="" {ondblclick}="">{prductNm}</td>
<td class="cmn text-end" {onclick}="" {ondblclick}="">{pceQy}</td>
<td class="cmn text-center prdDsuseImg" {onclick}="" {ondblclick}=""></td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{prdValidDe}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{mnfNo}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{mnfSeq}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{minDistbQy} {minDistbUnit}</td>
<td class="cmn text-center" {onclick}="" {ondblclick}="">{pceQy} {pceUnit}</td>
<tr data-key="{keyCnt}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td>
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{dsuseQy}</td>
<td class="cmn text-center prdDsuseImg" onclick="{onclick}" ondblclick="{ondblclick}"></td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdValidDe}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{mnfNo}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{mnfSeq}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{minDistbQy} {minDistbUnit}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{pceQy} {pceUnit}</td>
</tr>
</template>
<template id="productListNotFound--productList">
@ -159,6 +159,7 @@
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = {};
prdRowKey = 0;
/**************************************************************************
* script 진입
@ -193,7 +194,7 @@
$P.productControl = new DatasetControl({
prefix: "dsuseMgtReceiptProduct"
, prefixName: "마약류 제품 조회"
, keymapper: info => info ? info.prductCd : ""
, keymapper: info => info ? info.keyCnt : ""
, dataGetter: obj => obj.${infoPrefix}Info
, infoSize: "xl"
});
@ -201,7 +202,7 @@
$P.productList = new Dataset({
prefix: "dsuseMgtReceiptProductList"
, prefixName: "마약류 제품 조회"
, keymapper: info => info ? info.prductCd : ""
, keymapper: info => info ? info.keyCnt : ""
, dataGetter: obj => {
if (!obj.success){
dialog.alert(obj.message);
@ -318,18 +319,18 @@
}
//$P.control.onSave(resp)
dialog.alert("저장됐습니다.");
dialog.alert("처리 되었습니다.");
dialog.close("dsuseMgtReceiptDialog");
//this._load();
}
});
}
$P.productList.onDatasetChange = item => {
$P.productList.onAppend = item => {
if (!item) return;
let empty = $P.productList.empty;
// 업무별 DataTables(그리드) tr, td
let foundContent = document.getElementById("productListRow--productList").content;
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
@ -341,16 +342,31 @@
//
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].productList.setCurrent('" + dataItem.getValue("prductCd") + "');");
.replace(/{onclick}/gi, "pageObject['${pageName}'].productList.setCurrent('" + dataItem.getValue("keyCnt") + "');");
let di = $P.productList.getData(item[0].keyCnt, "item");
let tr = di.inString(foundTr.outerHTML, replacer);
let trs = empty ? [document.getElementById("$productListNotFound--productList").content.outerHTML]
: $P.productList.inStrings(foundTr.outerHTML, replacer);
$("#tbody--productList").append(tr);
fnMakeGridImageViewer($("#tbody--productList").find("td.prdDsuseImg").last()[0], "dsusePrdImgFiles");
}
$P.productList.onRemove = item => {
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), true, true);
let key = item[0].data.keyCnt;
fnMakeGridImageViewer($("#tbody--productList").find("td.prdDsuseImg").get(), "dsusePrdImgFiles");
$("#tbody--productList").find("tr[data-key='"+key+"']").remove();
}
$P.productList.onCurrentChange = item => {
if (!item) return;
let key = item.data.keyCnt;
$("#tbody--productList").setCurrentRow(key);
}
/**************************************************************************
* DataTables 이벤트
**************************************************************************/
@ -440,20 +456,25 @@
return false;
}
const prdFrm = $P.productFormFields.get();
const prdInfo = ""+prdFrm.prductCd+prdFrm.prdValidDe+prdFrm.mnfNo+prdFrm.mnfSeq;
let isDup = $P.productList
.getDataset()
.filter(item => item.prductCd == $P.productFormFields.get().prductCd)
.filter(item => prdInfo == ""+item.prductCd+item.prdValidDe+item.mnfNo+item.mnfSeq)
.length > 0;
if(isDup){
const msg = "이미 추가된 제품 입니다<br>제품코드: " + prdFrm.prductCd +"<br>유효기간: "+ prdFrm.prdValidDe +"<br>제조번호: "+ prdFrm.mnfNo +"<br>제조일련번호: "+ prdFrm.mnfSeq;
dialog.alert({
content: "등록한 상품[" + $P.productFormFields.get().prductCd + "]입니다"
content: msg
});
return false;
}
$P.productList.addData([$P.productFormFields.get()]);
console.log($P.productFormFields.get());
const data = {...$P.productFormFields.get(), keyCnt : ""+prdRowKey++};
console.log(data);
$P.productList.append([data]);
// FIXME: 상품필드 초기화 코드 추가
//
}
@ -462,11 +483,12 @@
// validate 확인
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
const row = $P.productList.getCurrent();
dialog.alert({
content: "현재 " + $P.control.prefixName + " 정보를 저장하시겠습니까?"
content: "아래 제품을 삭제하시겠습니까?<br>제품명: "+row.prductNm + "<br>유효기간: " +row.prdValidDe+"<br>제조번호: "+row.mnfNo+"<br>일련번호: " + row.mnfSeq
, init: () => { setDialogZindex(); }
, onOK: () => {
$P.control.save($P.bsshFormFields.get()); // formFields
$P.productList.remove($P.productList.getCurrent().keyCnt);
}
});
}
@ -496,7 +518,6 @@
// 초기 화면 설정
$P.initForm = () => {
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
}
@ -511,7 +532,7 @@
$P.initForm();
// 3. Dataset 설정
//$P.control.setData([${dsuseReceptInfo}]);
$P.control.setData([${dsuseReceptInfo}]);
//$P.productControl.setData([${opnnDlbrMbrInfo}]);
});

@ -144,10 +144,12 @@
<th class="cmn" style="width: 72px;">No.</th>
<th class="sorting sorting_asc" aria-sort="ascending" style="width: 300.719px;">제품명</th>
<th class="sorting" style="width: 146.156px;">제품코드</th>
<th class="sorting" style="width: 130.141px;">폐기수량</th>
<th class="sorting" style="width: 90.141px;">폐기수량</th>
<th class="sorting" style="width: 130.469px;">유효기간</th>
<th class="sorting" style="width: 200.469px;">최소 유통단위 수량</th>
<th class="sorting" style="width: 180.469px;">낱개 단위 수량</th>
<th class="sorting" style="width: 160.469px;">제조번호</th>
<th class="sorting" style="width: 160.469px;">일련번호</th>
<th class="sorting" style="width: 180.469px;">유통단위 수량</th>
<th class="sorting" style="width: 180.469px;">낱개단위 수량</th>
</tr>
</thead>
<tbody id="tbody--${pageName}Detail">
@ -159,6 +161,8 @@
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRDUCT_CD}</td>
<td class="text-end" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_QY} {PCE_UNIT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRD_VALID_DE}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MNF_NO}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MNF_SEQ}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MIN_DISTB_QY} {MIN_DISTB_UNIT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PCE_QY} {PCE_UNIT}</td>
</tr>
@ -214,7 +218,7 @@
}
});
// $P.control 설정
$P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.defaultFetchSize = FETCH_XXS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.untilPageNum = 0; // 현재 페이지 번호
$P.control.beforeCurrent = null;
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 완료 여부

@ -140,8 +140,10 @@
<th class="cmn" style="width: 72px;">No.</th>
<th class="sorting sorting_asc" aria-sort="ascending" style="width: 350.719px;">제품명</th>
<th class="sorting" style="width: 146.156px;">제품코드</th>
<th class="sorting" style="width: 130.141px;">폐기수량</th>
<th class="sorting" style="width: 90.141px;">폐기수량</th>
<th class="sorting" style="width: 130.469px;">유효기간</th>
<th class="sorting" style="width: 160.469px;">제조번호</th>
<th class="sorting" style="width: 160.469px;">일련번호</th>
<th class="sorting" style="width: 180.469px;">유통단위 수량</th>
<th class="sorting" style="width: 180.469px;">낱개단위 수량</th>
</tr>
@ -155,6 +157,8 @@
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRDUCT_CD}</td>
<td class="text-end" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_QY} {PCE_UNIT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRD_VALID_DE}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MNF_NO}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MNF_SEQ}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MIN_DISTB_QY} {MIN_DISTB_UNIT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PCE_QY} {PCE_UNIT}</td>
</tr>
@ -210,7 +214,7 @@
}
});
// $P.control 설정
$P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.defaultFetchSize = FETCH_XXS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.untilPageNum = 0; // 현재 페이지 번호
$P.control.beforeCurrent = null;
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 완료 여부

@ -15,7 +15,8 @@
<label for="ProductCd--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">제품코드</label>
<input type="text" class="form-control w-60" id="productCd--${pageName}" name="schProductCd" >
</div>
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색">검색</button>
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색">검색</button>&nbsp;
<button type="button" class="btn btn-primary w-px-120" id="btnSearch2--${pageName}" title="검색">NIMS 검색</button>
</div>
</div>
</form>
@ -39,21 +40,21 @@
<th class="sorting" style="width: 146.156px;">제품코드</th>
<th class="sorting" style="width: 300.141px;">제품명</th>
<th class="sorting" style="width: 230.469px;">유효기간</th>
<th class="sorting" style="width: 230.469px;">제조번호</th>
<th class="sorting" style="width: 230.469px;">제조일련번호</th>
<th class="sorting" style="width: 230.469px;">최소유통단위</th>
<th class="sorting" style="width: 230.469px;">최수유통단위명</th>
<th class="sorting" style="width: 230.469px;">낱개단위</th>
<th class="sorting" style="width: 230.469px;">낱개단위명</th>
<th class="sorting" style="width: 160.469px;">제조번호</th>
<th class="sorting" style="width: 160.469px;">제조일련번호</th>
<th class="sorting" style="width: 130.469px;">최소유통단위</th>
<th class="sorting" style="width: 180.469px;">최수유통단위명</th>
<th class="sorting" style="width: 130.469px;">낱개단위</th>
<th class="sorting" style="width: 130.469px;">낱개단위명</th>
<th class="sorting" style="width: 160.141px;">마약/향정 구분</th>
<th class="sorting" style="width: 230.469px;">중점/일반 구분</th>
<th class="sorting" style="width: 230.469px;">취급자번호</th>
<th class="sorting" style="width: 160.469px;">중점/일반 구분</th>
<th class="sorting" style="width: 130.469px;">취급자번호</th>
</tr>
</thead>
<tbody id="tbody--${pageName}">
</tbody>
<template id="${infoPrefix}Row--${pageName}">
<tr data-key="{prductCd}">
<tr data-key="{keyCnt}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductCd}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prductNm}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prdValidDe}</td>
@ -103,16 +104,18 @@
}
, prefix: "productMain"
, prefixName: "마약류 제품 조회"
, keymapper: info => info ? info.prductCd : ""
, keymapper: info => info ? info.keyCnt : ""
, dataGetter : obj => {
if (!obj.success){
dialog.alert(obj.message);
return false;
}
// 제품 목록
let keyCnt = 0; // key 설정 : 상품코드로는 불가하여 임시로 생성
return obj.data?.map(item => {
// mnfSeqInfos 배열의 데이터 갯수만큼 반복문 실행
return item.mnfSeqInfos.map(info => ({
keyCnt: keyCnt++,
prductCd: item.prductCd,
prductNm: item.prductNm,
nrcdSeNm: item.nrcdSeNm,
@ -136,7 +139,7 @@
});
// $P.control 설정
$P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.defaultFetchSize = FETCH_XXL; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.untilPageNum = 0; // 현재 페이지 번호
$P.control.beforeCurrent = null;
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 완료 여부
@ -165,8 +168,7 @@
$P.control.onCurrentChange = item => {
if (!item) return;
let key = item.data.prductCd;
$("#tbody--${pageName}").setCurrentRow(key);
$("#tbody--${pageName}").setCurrentRow(item.data.keyCnt);
// Dataset 셋팅
$P.formFields.set($P.control, item);
}
@ -196,7 +198,7 @@
//
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("prductCd") + "');")
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("keyCnt") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnSave()");
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
@ -205,7 +207,7 @@
let noMore = (totalSize == ${infoPrefix}List.length);
let initScroll = ($P.control.query.pageNum < 2) && ($P.control.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
$("#tbody--${pageName}").html(trs.join());
if ($P.control.untilPageNum != 0) {
$P.control.query.fetchSize = $P.control.defaultFetchSize;
@ -222,15 +224,15 @@
* 버튼 clickEvent
**************************************************************************/
$P.fnSearchList = () => {
$P.fnSearchList = (dbSkipYn) => {
$P.control.query = {
... $P.formFields.get(),
p: $P.formFields.get().schProductCd,
pn: $P.formFields.get().schProductNm,
dbSkipYn: "N",
dbSkipYn: dbSkipYn? dbSkipYn : "N",
userId: "${currentUser.account}"
};
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수
$P.control.query.fetchSize = FETCH_XXL; // 한번에 조회되는 자료 건수
$P.control.query.delYn = "N"; // 삭제 여부
$P.control.load(1);
@ -238,12 +240,13 @@
// 저장
$P.fnSave = () => {
console.log("#${openPage}");
dialog.alert({
content: "현재 " + $P.control.prefixName + " 정보를 선택 하시겠습니까?"
, init: () => { setDialogZindex(); }
, onOK: () => {
let openPage = new AddsFormFields("#${openPage}");
console.log($P.control.getCurrent());
openPage.set (null,$P.control.getCurrent()); // formFields
dialog.close("productMainDialog");
}
@ -258,18 +261,14 @@
// 버튼 이벤트
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); // 저장
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList());
$("#btnSearch2--${pageName}").on("click", () => $P.fnSearchList("Y"));
}
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
// DataTables 스크롤 이벤트 생성
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
// 초기 화면 설정
$P.initForm = () => {
}
$P.initForm = () => {}
/**************************************************************************
* 최초 실행 함수
@ -279,9 +278,6 @@
// 2. 초기 화면 설정
$P.initForm();
// 3. Dataset 설정
//$P.control.setData([${opnnDlbrMbrInfo}]);
});
</script>

@ -0,0 +1,80 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<form id="change-password">
<div class="row g-3">
<div class="col-md-12">
<div class="row">
<label class="col-sm-4 col-form-label text-sm-end required" for="currentPassword">현재 비밀번호</label>
<div class="col-sm-8"><input name="currentPassword" type="password" required class="form-control" /></div>
</div>
</div>
<div class="col-md-12">
<div class="row">
<label class="col-sm-4 col-form-label text-sm-end required" for="password">새 비밀번호</label>
<div class="col-sm-8"><input name="password" type="password" required class="form-control" /></div>
</div>
</div>
<div class="col-md-12">
<div class="row">
<label class="col-sm-4 col-form-label text-sm-end required" for="confirmPassword">비밀번호 확인</label>
<div class="col-sm-8"><input name="confirmPassword" type="password" required class="form-control" /></div>
</div>
</div>
</div>
</form>
<script>
function changePassword() {
if (!$("#change-password input").validInputs())
return false;
let passwords = document.querySelectorAll("#change-password input[type='password']");
if (passwords[0].value == passwords[1].value) {
dialog.alert("현재 비밀번호와 새 비밀번호가 같습니다.");
return false;
}
if (passwords[1].value != passwords[2].value) {
dialog.alert("새 비밀번호와 비밀번호 확인이 다릅니다.");
return false;
}
return currentUserControl.changePassword({
userIDs: "${currentUser.id}",
currentPassword: passwords[0].value,
password: passwords[1].value
})
.then(resp => {
if (!resp.saved) {
dialog.alert("현재 비밀번호가 잘못됐습니다.");
} else {
dialog.alert({
content: "비밀번호가 변경됐습니다.<br />다시 로그인하시기 바랍니다.",
onClose: () => logout(false)
});
}
});
}
$(function() {
$("#change-password input").onEnterPress(() => changePassword());
});
<%--
function savePassword(){
ajax.post({
url : wctx.url("/user/changePassword.do"),
data : {
userID : MY_INFO.id,
password : $("#change-password input[name='password']").val()
},
success : (resp) => {
if(resp.saved){
dialog.alert("비밀번호 변경에 성공하였습니다.");
dialog.close("changePasswordDialog");
} else {
dialog.alert("비밀번호 변경에 실패하였습니다.");
}
}
});
}
--%>
//# sourceURL=password.jsp
</script>

@ -142,8 +142,9 @@
<div class="row mt-4 justify-content-end">
<div class="col-md-6">
<div class="row justify-content-end">
<div class="col-sm-3">
<div class="flex-row justify-content-end">
<button onclick="saveinfoPrefix();" type="button" class="btn btn-primary">저장</button>
<c:if test='${currentUser.hasAuthorities("ROLE_ADMIN")}'><button onclick="initPassword();" type="button" class="btn btn-primary">비밀번호 초기화</button></c:if>
</div>
</div>
</div>
@ -207,5 +208,31 @@ function saveinfoPrefix() {
}
});
}
function _initPassword() {
let resp = userControl.changePassword({
userIDs: userControl.getCurrent().USER_ID,
init: true
});
if (resp.saved)
dialog.alert("비밀번호가 초기화됐습니다.");
}
async function initPassword() {
dialog.alert({
title: "비밀번호 초기화",
content: "비밀번호를 초기화하시겠습니까?",
onOK: () => {
userControl.changePassword({
userIDs: userControl.getCurrent().USER_ID,
init: true
})
.then(resp => {
if (resp.saved)
dialog.alert("비밀번호가 초기화됐습니다.");
});
}
});
}
//# sourceURL=user-info.jsp
</script>

@ -61,15 +61,19 @@ wctx.csrf = {
dialog.title = "마약류폐기지원시스템";
<c:if test="${currentUser.authenticated}">
function logout() {
dialog.alert({
content:"로그아웃 하시겠습니까?",
onOK:function(){
function logout(prompt) {
let func = () => {
var form = $("<form action=\"<c:url value='/logout.do'/>\", method=\"POST\">");
$("<input name=\"${_csrf.parameterName}\" value=\"${_csrf.token}\" type=\"hidden\">").appendTo(form);
form.appendTo("body").submit();
}
});
};
if (prompt !== false)
dialog.alert({
content: "로그아웃 하시겠습니까?",
onOK: func
});
else
func();
}</c:if>
<c:if test="${currentUser.hasAuthorities('ROLE_ADMIN')}">
@ -92,5 +96,5 @@ async function selectURL(multiple) {
});
}
</c:if>
${functions}</c:set>
${functions}
</c:set>

@ -12,15 +12,7 @@
alt="Login image"
/>
</a>
<div class="d-flex" style="min-width:600px;">
<div class="row">
<div class="col-12">
<input type="text" class="form-control-sm" placeholder="폐기관리아이디" />
<button type="button" class="btn-sm btn-primary" onclick="fnCreateDoc(true);">폐기결과보고서 생성</button>
<button type="button" class="btn-sm btn-primary" onclick="fnCreateDoc(false);">폐기처리내역문서 생성</button>
</div>
</div>
</div>
</div>
@ -45,14 +37,11 @@
</a>
</li>
<li><div class="dropdown-divider"></div></li>
<!-- 기능 미구현
<li>
<a class="dropdown-item" href="pages-account-settings-account.html">
<li><a class="dropdown-item" onclick="currentUserControl.changePassword()">
<i class="bx bx-cog me-2"></i>
<span class="align-middle">설정</span>
<span class="align-middle">비밀번호 변경</span>
</a>
</li>
-->
<li><div class="dropdown-divider"></div></li>
<li onclick="logout();">
<a class="dropdown-item">
@ -78,31 +67,7 @@ function setPageTitle(pageTitle) {
$("#pageTitle").html(pageTitle);
}
function fnCreateDoc(flag){
var url = "";
if(flag){
url = wctx.url("/doc/makeDisposeResultReportHwp.do");
} else {
url = wctx.url("/doc/makeDisposeProcessDetailsHwp.do");
}
var textBox = $("#layout-navbar").find("input[type='text']");
var value = textBox.val();
if(value == ""){
textBox.focus();
return;
}
ajax.get({
url: url,
data:{dscdmngId : value},
success:resp => {
console.log("파일아이디:"+resp.fileId);
}
});
}

@ -146,6 +146,7 @@ $(".sticky-element").sticky({
$(function() {
${onload}
mainTabs.open(FIRST_PAGE);
<c:if test="${currentUser.info.promptPasswordChange}">currentUserControl.changePassword();</c:if>
});
//# sourceURL=index.jsp

@ -1,49 +1,48 @@
/**************************************************************************
* 그리드 내부 이미지 첨부
**************************************************************************/
function fnMakeGridImageViewer(tdEls, fileInputElName){
for(let tdEl of tdEls){
let fileInputEl = document.createElement("input");
fileInputEl.name = fileInputElName;
fileInputEl.type = "file";
fileInputEl.setAttribute("hidden","hidden");
fileInputEl.setAttribute("accept","image/*")
tdEl.appendChild(fileInputEl);
function fnMakeGridImageViewer(tdEl, fileInputElName){
let uploadButtonEl = document.createElement("button");
uploadButtonEl.type = "button";
uploadButtonEl.classList.add("btn","btn-primary","w-px-50", "mx-1");
uploadButtonEl.textContent = "등록";
tdEl.appendChild(uploadButtonEl);
let viewButtonEl = document.createElement("button");
viewButtonEl.type = "button";
viewButtonEl.classList.add("btn","btn-primary","w-px-50", "mx-1");
viewButtonEl.setAttribute("hidden","hidden");
viewButtonEl.textContent = "보기";
tdEl.appendChild(viewButtonEl);
let fileInputEl = document.createElement("input");
fileInputEl.name = fileInputElName;
fileInputEl.type = "file";
fileInputEl.setAttribute("hidden","hidden");
fileInputEl.setAttribute("accept","image/*")
tdEl.appendChild(fileInputEl);
let uploadButtonEl = document.createElement("button");
uploadButtonEl.type = "button";
uploadButtonEl.classList.add("btn","btn-primary","w-px-50", "mx-1");
uploadButtonEl.textContent = "등록";
tdEl.appendChild(uploadButtonEl);
$(fileInputEl).on("change", function(){
if(this.files != null && this.files.length > 0){
$(uploadButtonEl).text("수정");
$(viewButtonEl).removeAttr("hidden");
} else {
$(uploadButtonEl).text("등록");
$(viewButtonEl).attr("hidden","hidden");
}
});
let viewButtonEl = document.createElement("button");
viewButtonEl.type = "button";
viewButtonEl.classList.add("btn","btn-primary","w-px-50", "mx-1");
viewButtonEl.setAttribute("hidden","hidden");
viewButtonEl.textContent = "보기";
tdEl.appendChild(viewButtonEl);
$(fileInputEl).on("change", function(){
if(this.files != null && this.files.length > 0){
$(uploadButtonEl).text("수정");
$(viewButtonEl).removeAttr("hidden");
} else {
$(uploadButtonEl).text("등록");
$(viewButtonEl).attr("hidden","hidden");
}
});
$(uploadButtonEl).on("click", function(){
$(fileInputEl).click();
});
$(viewButtonEl).on("click", function(){
$(uploadButtonEl).on("click", function(){
$(fileInputEl).click();
});
let viewUrl = (window.URL || window.webkitURL).createObjectURL(fileInputEl.files[0]);
$(viewButtonEl).on("click", function(){
window.open((window.URL || window.webkitURL).createObjectURL(fileInputEl.files[0])
, "이미지"
, "width=500, height=500");
});
}
window.open(viewUrl, "이미지", "width=500, height=500");
});
}
Loading…
Cancel
Save