diff --git a/BO/Views/cm/cmreg.cshtml b/BO/Views/cm/cmreg.cshtml index 962d73c..791f57c 100644 --- a/BO/Views/cm/cmreg.cshtml +++ b/BO/Views/cm/cmreg.cshtml @@ -364,6 +364,23 @@ else { $("#spnaccommofee").hide(); } + + if ($("input[name='CM.cshape']:checked").val() == '1') { + $("#alldays").prop("disabled", true); + } + else { + $("#alldays").prop("disabled", false); + } + + if ($("#alldays").is(":checked")) { + $("#CM_cshape1").prop("disabled", true); + if ($("#CM_studydays").val() == null || $("#CM_studydays").val() == "" || $("#CM_studydays").val() == 0) { + $("#CM_studydays").val(15); + } + } + else { + $("#CM_cshape1").prop("disabled", false); + } $("input[name='CM.cshape']").on("change", function () { if ($(this).val() == "0") { $("#spnaccommofee").hide(); @@ -371,6 +388,13 @@ else { $("#spnaccommofee").show(); } + + if ($(this).val() == "1") { + $("#alldays").prop("disabled", true); + } + else { + $("#alldays").prop("disabled", false); + } }); loadlegal($("#pcgno").val()); @@ -382,6 +406,7 @@ $("#stime2").show(); $("#gtime").hide(); setv("CM_retime", "2099-12-31"); + $("#CM_cshape1").prop("disabled", true); } else { var date = new Date(); setv("CM_retime", date.getFullYear() + "-" + ("0" + (date.getMonth() + 1)).slice(-2) + "-" + ("0" + date.getDate()).slice(-2)); @@ -389,8 +414,11 @@ $("#stime").show(); $("#stime2").hide(); $("#gtime").show(); + $("#CM_cshape1").prop("disabled", false); } }); + + }); function loadlegal(cgno) { capp("/acommon/cgget", { cgno: cgno }, "renderlegal"); @@ -435,6 +463,7 @@ else if (isallday != true && @Model.CM.ismaster == 0 && check("CM_setime", null, "학습기간을 입력해주세요.")) { } else if (isallday != true && @Model.CM.ismaster == 0 && check("CM_gstime", null, "성적처리기간을 입력해주세요.")) { } else if (isallday != true && @Model.CM.ismaster == 0 && check("CM_getime", null, "성적처리기간을 입력해주세요.")) { } + else if (isallday == true && @Model.CM.ismaster == 0 && check("CM_studydays", null, "학습기간을 입력해주세요.")) { } else if (@Model.CM.ismaster == 0 && getDouble($("#CM_studytime").val()) < 1) { $("#CM_studytime").focus(); msg("학습시간은 1 ~ 999 사이의 값을 입력해주세요."); } else if ($("#cmprdatabox li").length < 1) { $("#cmprdatabox").parent().find("a.data-find").focus(); msg("담당자를 선택해주세요."); } //else if ('@Model.CM.pcgcode' == '@ViewBag.TestCode' && '@(Model.CM.cgcode)' != '@ViewBag.TestCode3' && val("CM_certcc") == "") { focus("CM_certcc"); msg("자격증을 선택해주세요.");} diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml index 39490a5..046256f 100644 --- a/Dao/MyBatis/Maps/CM.xml +++ b/Dao/MyBatis/Maps/CM.xml @@ -170,7 +170,7 @@ and (date_format(a.retime,'%Y%m%d') != '20991231' and a.rstime < now() and a.getime > now()) or date_format(a.retime,'%Y%m%d') = '20991231' and a.isuse=#isuse# ) a - order by a.isalldays, a.rno + order by a.rno