From b7a502ff6a54981e1ea53166d6f42b9ca1a69418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Thu, 23 Mar 2023 14:59:19 +0900 Subject: [PATCH] =?UTF-8?q?sri=20=EC=A0=80=EC=9E=A5=20=EC=A0=84=20?= =?UTF-8?q?=EA=B2=80=EC=A6=9D=EB=8F=99=EC=9E=91=20=EC=B6=94=EA=B0=80.=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mybatisMapper/SriMapper.xml | 1 + src/main/resources/static/js/faRpt/sri.js | 33 ++++++++++++++++--- .../resources/templates/sri/sriBoard.html | 8 ++--- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/main/resources/mybatisMapper/SriMapper.xml b/src/main/resources/mybatisMapper/SriMapper.xml index 68cf019f..9c0ae786 100644 --- a/src/main/resources/mybatisMapper/SriMapper.xml +++ b/src/main/resources/mybatisMapper/SriMapper.xml @@ -6,6 +6,7 @@ + a.status <> 'DST008' and a.wrt_user_seq = #{wrtUserSeq} and a.ref_key is null diff --git a/src/main/resources/static/js/faRpt/sri.js b/src/main/resources/static/js/faRpt/sri.js index 22e3c81c..6357569b 100644 --- a/src/main/resources/static/js/faRpt/sri.js +++ b/src/main/resources/static/js/faRpt/sri.js @@ -73,12 +73,37 @@ $(document).on('click', '#getMenuBtn', function (){ }) $(document).on('click', '.saveBtn', function (){ - if(confirm(this.textContent+"하시겠습니까?")){ - const activeTab = $(".tabLink.active")[0].id.replace('Tab', ''); - saveSri($(this).attr("data-state"), this.textContent, activeTab); + const state = $(this).attr("data-state") + if(state === "DST001" || sriDataCheck()){ + if(confirm(this.textContent+" 하시겠습니까?")){ + const activeTab = $(".tabLink.active")[0].id.replace('Tab', ''); + saveSri(state, this.textContent, activeTab); + } } }) - +function sriDataCheck(){ + if(!$("#faSriType").val()){ + alert("분류를 선택해주세요.") + return false; + } + if(!$("#faSriEdate").val()){ + alert("제출기한일을 선택해주세요.") + return false; + } + if(!$("#faSriETime").val()){ + alert("제출기한 시간을 입력해주세요.") + return false; + } + if(!$("#title").val()){ + alert("제목을 입력해주세요.") + return false; + } + if($(".readUserRow").length===0){ + alert("수신자를 선택해주세요.") + return false; + } + return true; +} function saveSri(faSriState, btnText, activeTab){ $("#status").val(faSriState); contentFade("in"); diff --git a/src/main/resources/templates/sri/sriBoard.html b/src/main/resources/templates/sri/sriBoard.html index 6d90f29f..8cba7afd 100644 --- a/src/main/resources/templates/sri/sriBoard.html +++ b/src/main/resources/templates/sri/sriBoard.html @@ -89,17 +89,14 @@ 부서 분류 제출기한 - 상태 + 상태 작성자 작성일 - - - @@ -119,14 +116,13 @@ - + -