Browse Source

休学复学修改休学时段 添加开始和结束时间判断

新疆警官学校中职
libo 1 year ago
parent
commit
c055ebb68f
2 changed files with 22 additions and 4 deletions
  1. +9
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/RestAgainIndex.cshtml
  2. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/RestAgainIndex.js

+ 9
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/RestAgainIndex.cshtml View File

@@ -124,17 +124,22 @@
<div class="lr-form-item-title">保留学籍<font face="宋体">*</font></div>
<div id="StuStatus" type="text" class="form-control" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-2 lr-form-item">
<div class="col-xs-3 lr-form-item">
<div class="lr-form-item-title">离班日期<font face="宋体">*</font></div>
<input id="EnteDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#EnteDate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-2 lr-form-item">
<div class="col-xs-3 lr-form-item">
<div class="lr-form-item-title">休学年限<font face="宋体">*</font></div>
<input id="SuspensionPeriod" class="form-control" type="text" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-2 lr-form-item" >
<div class="col-xs-2 lr-form-item">
<div class="lr-form-item-title">休学时段<font face="宋体">*</font></div>
<input id="SuspensionBeginTime" class="form-control" type="text" isvalid="yes" checkexpession="NotNull" />
<input id="SuspensionBeginTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'SuspensionEndTime\',{d:-3});}', dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#SuspensionBeginTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />

</div>
<div class="col-xs-2 lr-form-item" style="padding-left:25px;">
<div class="lr-form-item-title" style="width:25px;" >至<font face="宋体">*</font></div>
<input id="SuspensionEndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'SuspensionBeginTime\',{d:3})}', dateFmt: 'yyyy-MM-dd', onpicked: function() { $('#SuspensionEndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />

</div>
<div class="col-xs-12 lr-form-item">


+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/RestAgainIndex.js View File

@@ -19,10 +19,23 @@ var bootstrap = function ($, learun) {
}
})
$('#SubmitBtn').on('click', function () {
if (!$('body').lrValidform()) {
return false;
}
var entity = $('body').lrGetFormData();
let starttime = new Date(entity.SuspensionBeginTime).getTime();
let endtime = new Date(entity.SuspensionEndTime).getTime();
if (endtime < starttime) {
learun.alert.warning("起始日期不能大于终止日期!");
return false;
}

if (parseInt(Math.abs(endtime - starttime) / 1000 / 60 / 60 / 24) < 183) {
learun.alert.warning("起始时间与终止时间不能小于半年!");
return false;
}
var selgridtab = $('#selgridtab').jfGridGet('rowdatas');
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/SaveForm', { entity: entity, strStuEntity: JSON.stringify(selgridtab) },
function (res) {


Loading…
Cancel
Save