견문 목록 일괄결재 오류 수정.

master
강석 최 2023-05-02 14:28:43 +09:00
parent 57a6e547fa
commit 794c09f147
2 changed files with 20 additions and 20 deletions

View File

@ -162,33 +162,33 @@ $(document).on('click', '#tableApprvBtn', function (){
const apprvAuth = $(this).attr("data-apprvauth") const apprvAuth = $(this).attr("data-apprvauth")
let affairRateFlag = true; let affairRateFlag = true;
$.each($(".apprvTd"), function (idx, el) { $.each($(".apprvTd"), function (idx, el) {
if (apprvAuth === "APC003" || apprvAuth === "APC004") { const chkbox = $(el).find(".apprvChkbox:checked")
const chkbox = $(el).find(".apprvChkbox:checked") if(chkbox.length>0){
if(chkbox.length>0){ if (chkbox.val() === "DST003" || chkbox.val() === "DST004") {
const affairRating = {}; const affairRating = {};
affairRating["affairKey"] = Number($(el).find(".affairKey").val()); affairRating["affairKey"] = Number($(el).find(".affairKey").val());
affairRating["sectionApprv"] = chkbox.val(); affairRating["sectionApprv"] = chkbox.val();
ratingList.push(affairRating); ratingList.push(affairRating);
} } else {
} else { const selectorValue = $(el).find(".ratingSelector").val()
const chkbox = $(el).find(".apprvChkbox:checked") if(chkbox.length>0){
const selectorValue = $(el).find(".ratingSelector").val() const affairRating = {};
if(chkbox.length>0){ affairRating["affairKey"] = Number($(el).find(".affairKey").val());
const affairRating = {}; affairRating["headApprv"] = chkbox.val();
affairRating["affairKey"] = Number($(el).find(".affairKey").val()); if(selectorValue !== ""){
affairRating["headApprv"] = chkbox.val(); affairRating["affairRate"] = selectorValue;
if(selectorValue !== ""){ affairRating["organUp"] = $(el).find(".organUpChkBox").prop("checked")?"T":"F";
affairRating["affairRate"] = selectorValue; }else{
affairRating["organUp"] = $(el).find(".organUpChkBox").prop("checked")?"T":"F"; if(chkbox.val()==="DST006"){
}else{ //부장승인 & 평가 미입력.
if(chkbox.val()==="DST006"){ affairRateFlag = false;
//부장승인 & 평가 미입력. }
affairRateFlag = false;
} }
ratingList.push(affairRating);
} }
ratingList.push(affairRating);
} }
} }
}) })
if(affairRateFlag){ if(affairRateFlag){
affairStateChange(ratingList); affairStateChange(ratingList);

View File

@ -134,7 +134,7 @@
</th:block> </th:block>
</label> </label>
<div class="col-11"> <div class="col-11">
<div class="row" th:if="${rate.sectionApprv eq null}"> <div class="row" th:if="${rate.sectionApprv eq null and rate.headApprv eq null}">
<label class="col-sm-12 col-form-label col-form-label-sm text-center bg-white">결재정보가 없습니다.</label> <label class="col-sm-12 col-form-label col-form-label-sm text-center bg-white">결재정보가 없습니다.</label>
</div> </div>
<div class="row border-top-0 border-secondary" th:if="${rate.sectionApprv ne null}"> <div class="row border-top-0 border-secondary" th:if="${rate.sectionApprv ne null}">