Pārlūkot izejas kodu

报名

临城职教中职
ndbs pirms 2 gadiem
vecāks
revīzija
3667e2cfdd
7 mainītis faili ar 298 papildinājumiem un 456 dzēšanām
  1. +12
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerPhoneController.cs
  2. +121
    -340
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/FormApply.cshtml
  3. +6
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/Search.cshtml
  4. +101
    -100
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/SearchResult.cshtml
  5. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerBLL.cs
  6. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerIBLL.cs
  7. +29
    -12
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs

+ 12
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerPhoneController.cs Parādīt failu

@@ -132,7 +132,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
StuVolunteerEntity entity = strEntity.ToObject<StuVolunteerEntity>();
entity.IsSubmit = false;
stuVolunteerIBLL.SaveEntity(keyValue, entity);
stuVolunteerIBLL.DraftForm(keyValue, entity);
return Success("保存成功!");
}

@@ -146,7 +146,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
StuVolunteerEntity entity = strEntity.ToObject<StuVolunteerEntity>();
entity.IsSubmit = true;
stuVolunteerIBLL.SaveEntity(keyValue, entity);
stuVolunteerIBLL.SubmitForm(entity.CardNo, entity);
return Success("提交成功!");
}

@@ -184,6 +184,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success(null);
}
}

public ActionResult SearchCard(string CardNo)
{
var StuVolunteerData = stuVolunteerIBLL.GetCardId(CardNo);
var jsonData = new
{
StuVolunteer = StuVolunteerData,
};
return Success(jsonData);
}
#endregion
}
}

+ 121
- 340
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/FormApply.cshtml Parādīt failu

@@ -278,363 +278,144 @@
<script src="~/Content/layui/layui.all.js"></script>
<script src="~/Content/vue/vue.js"></script>
<script src="~/PhonePage/server.js"></script>
<script>
var today = formatDateTimesM();
//var CardId = request('IDCARD'); //'XCMY1002';
layui.use(['form', 'laydate', 'upload'], function () {
var form = layui.form;
//登录按钮点击
form.on('submit(*)', function (data) {
//if (!$('#IdCardPto1').val() || !$('#IdCardPto2').val()) {
// alert('请上传身份证照片!');
// return;
//}
//if (!$('#MidDiplomaPto').val()) {
// alert('请上传初中毕业证照片!');
// return;
//}
//if (!$('#MidAchievementPto').val()) {
// alert('请上传中考成绩截图!');
// return;
//}

var strEntity = JSON.stringify(data.field);
//strEntity.CardNo = CardNo;
$.ajax({
url: '/EducationalAdministration/StuVolunteerPhone/DraftForm',
data: { strEntity: strEntity },
type: "POST",
dataType: "json",
async: true,
cache: false,
success: function (data) {
if (data.code == 200) {
alert('报名成功,请等待考试通知');
location.href = '/EducationalAdministration/StuVolunteer/Link?CardNo=' + CardNo;
} else {
return alert(data.data);
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
},
beforeSend: function () {
},
complete: function () {
<script>
var keyValue =
var today = formatDateTimesM();
layui.use(['form', 'laydate', 'upload'], function () {
var form = layui.form;
//登录按钮点击
form.on('submit(*)', function (data) {
var strEntity = JSON.stringify(data.field);
console.log(strEntity,123)
//strEntity.keyValue = keyValue;
$.ajax({
url: '/EducationalAdministration/StuVolunteerPhone/DraftForm',
data: { strEntity: strEntity },
type: "POST",
dataType: "json",
async: true,
cache: false,
success: function (data) {
if (data.code == 200) {
alert('报名成功,请等待考试通知');
location.href = '/EducationalAdministration/StuVolunteer/Link?CardNo=' + CardNo;
} else {
return alert(data.data);
}
});
//保存并提交
//$.ajax({
// url: '/EducationalAdministration/StuVolunteer/SubmitForm?keyValue=&IDCARD=' + CardId,
// data: { strEntity: strEntity },
// type: "POST",
// dataType: "json",
// async: true,
// cache: false,
// success: function (data) {
// if (data.code == 200) {
// alert('报名成功,请等待考试通知');
// location.href = '/EducationalAdministration/StuVolunteer/Link?CardId=' + CardId;
// } else {
// return alert(data.data);
// }
// },
// error: function (XMLHttpRequest, textStatus, errorThrown) {
// },
// beforeSend: function () {
// },
// complete: function () {
// }
//});
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。

});

var laydate = layui.laydate;

//时间选择
laydate.render({
elem: '#Birthday',
min: today.y + '-' + today.m + '-' + today.d
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
},
beforeSend: function () {
},
complete: function () {
}
});

var upload = layui.upload;

////初中毕业证
//var uploadInst = upload.render({
// elem: '#chickUpload',
// url: '/EducationalAdministration/EmpInfoEnternal/UploadImg',
// exts: 'jpg|png|gif|',
// multiple: false,
// before: function (obj) {
// //预读本地文件示例,不支持ie8
// obj.preview(function (index, file, result) {
// $('#chickUpload').html('<img src="' + result + '" alt="">') //图片链接(base64)
// });
// },
// done: function (res) {
// //如果上传失败
// if (res.code != 200) {
// return layer.msg('上传失败');
// } else {
// $("#MidDiplomaPto").val(res.data.folderId)
// }
// //上传成功
// },
// error: function () {
// //演示失败状态,并实现重传
// var demoText = $('#demoText');
// demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
// demoText.find('.demo-reload').on('click', function () {
// uploadInst.upload();
// });
// }
//});

////身份证正面照片
//var uploadIdCard = upload.render({
// elem: '#IdCardPtoUpload1',
// url: '/EducationalAdministration/EmpInfoEnternal/UploadImg',
// exts: 'jpg|png|gif|',
// multiple: true,
// before: function (obj) {
// //预读本地文件示例,不支持ie8
// obj.preview(function (index, file, result) {
// $('#IdCardPtoUpload1').html('<img src="' + result + '" alt="">') //图片链接(base64)
// });
// },
// done: function (res) {
// //如果上传失败
// if (res.code != 200) {
// return layer.msg('上传失败');
// } else {
// $("#IdCardPto1").val(res.data.folderId)
// }
// //上传成功
// },
// error: function () {
// //演示失败状态,并实现重传
// var demoText = $('#demoText');
// demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
// demoText.find('.demo-reload').on('click', function () {
// uploadIdCard.upload();
// });
// }
//});

////身份证反面照片
//var uploadIdCard = upload.render({
// elem: '#IdCardPtoUpload2',
// url: '/EducationalAdministration/EmpInfoEnternal/UploadImg',
// exts: 'jpg|png|gif|',
// multiple: true,
// before: function (obj) {
// //预读本地文件示例,不支持ie8
// obj.preview(function (index, file, result) {
// $('#IdCardPtoUpload2').html('<img src="' + result + '" alt="">') //图片链接(base64)
// });
// },
// done: function (res) {
// //如果上传失败
// if (res.code != 200) {
// return layer.msg('上传失败');
//保存并提交
//$.ajax({
// url: '/EducationalAdministration/StuVolunteer/SubmitForm?keyValue=&IDCARD=' + CardId,
// data: { strEntity: strEntity },
// type: "POST",
// dataType: "json",
// async: true,
// cache: false,
// success: function (data) {
// if (data.code == 200) {
// alert('报名成功,请等待考试通知');
// location.href = '/EducationalAdministration/StuVolunteer/Link?CardId=' + CardId;
// } else {
// $("#IdCardPto2").val(res.data.folderId)
// return alert(data.data);
// }
// //上传成功
// },
// error: function () {
// //演示失败状态,并实现重传
// var demoText = $('#demoText');
// demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
// demoText.find('.demo-reload').on('click', function () {
// uploadIdCard.upload();
// });
// }
//});
//中考成绩截图
//var uploadMidAchieve = upload.render({
// elem: '#MidAchievementUpload',
// url: '/EducationalAdministration/EmpInfoEnternal/UploadImg',
// before: function (obj) {
// //预读本地文件示例,不支持ie8
// obj.preview(function (index, file, result) {
// $('#MidAchievementUpload').html('<img src="' + result + '" alt="">') //图片链接(base64)
// });
// error: function (XMLHttpRequest, textStatus, errorThrown) {
// },
// done: function (res) {
// //如果上传失败
// if (res.code != 200) {
// return layer.msg('上传失败');
// } else {
// $("#MidAchievementPto").val(res.data.folderId);
// }
// //上传成功
// beforeSend: function () {
// },
// error: function () {
// //演示失败状态,并实现重传
// var demoText = $('#demoText');
// demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
// demoText.find('.demo-reload').on('click', function () {
// uploadMidAchieve.upload();
// });
// complete: function () {
// }
//});
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。

////监听地市
//form.on('select(City)', function (data) {
// //绑定县区
// $.ajax({
// url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "DIC_AREA" + "&where=" + "aparent='" + data.value + "'",
// async: false,
// success: function (msg) {
// var companys = $.parseJSON(msg).data.data;
// var str = '<option value="">请选择</option>';
// $.each(companys,
// function (i, item) {
// str += '<option value="' + item.acode + '">' + item.aname + '</option>';
// });
// $("#County").html(str);
// },
// });
// //绑定专业


// form.render();
//});
////监听县区
//form.on('select(County)', function (data) {
// //绑定专业
// $.ajax({
// url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo" + "&where=" + "Area='" + data.value + "'",
// async: false,
// success: function (msg) {
// var companys = $.parseJSON(msg).data.data;
// var str = '<option value="">请选择</option>';
// $.each(companys,
// function (i, item) {
// str += '<option value="' + item.id + '">' + item.majorname + '</option>'
// })
// $("#MajorNo").html(str);
// },
// });
});

var laydate = layui.laydate;

// form.render();
//});
//时间选择
laydate.render({
elem: '#Birthday',
min: today.y + '-' + today.m + '-' + today.d
});
$(window).load(function () {
//$('.chickInputBoxs input').attr('lay-verify', 'required');
//专业
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys,
function (i, item) {
str += '<option value="' + item.id + '">' + item.majorname + '</option>'
})
$("#MajorOne").html(str);
},
});
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys,
function (i, item) {
str += '<option value="' + item.id + '">' + item.majorname + '</option>'
})
$("#MajorTwo").html(str);
},
});
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys,
function (i, item) {
str += '<option value="' + item.id + '">' + item.majorname + '</option>'
})
$("#MajorThree").html(str);
},
});

////民族
//$.ajax({
// url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "BCdNationality",
// async: false,
// success: function (msg) {
// var companys = $.parseJSON(msg).data.data;
// var str = '<option value="">请选择</option>';
// $.each(companys,
// function (i, item) {
// str += '<option value="' + item.nationalityno + '">' + item.nationality + '</option>'
// })
// $("#Nationals").html(str);
// },
//});
////地市
//$.ajax({
// url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "DIC_CITY" + "&where=" + "cparent='650000'",
// async: false,
// success: function (msg) {
// var companys = $.parseJSON(msg).data.data;
// var str = '<option value="">请选择</option>';
// $.each(companys,
// function (i, item) {
// str += '<option value="' + item.ccode + '">' + item.cname + '</option>'
// })
// $("#City").html(str);
// },
//});
////县区
//$.ajax({
// url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "DIC_AREA",
// async: false,
// success: function (msg) {
// var companys = $.parseJSON(msg).data.data;
// var str = '<option value="">请选择</option>';
// $.each(companys,
// function (i, item) {
// str += '<option value="' + item.acode + '">' + item.aname + '</option>';
// });
// $("#County").html(str);
// },
//});
renderForm();

var upload = layui.upload;
});
$(window).load(function () {
//$('.chickInputBoxs input').attr('lay-verify', 'required');
//专业
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys,
function (i, item) {
str += '<option value="' + item.id + '">' + item.majorname + '</option>'
})
$("#MajorOne").html(str);
},
});
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys,
function (i, item) {
str += '<option value="' + item.id + '">' + item.majorname + '</option>'
})
$("#MajorTwo").html(str);
},
});
$.ajax({
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo",
async: false,
success: function (msg) {
var companys = $.parseJSON(msg).data.data;
var str = '<option value="">请选择</option>';
$.each(companys,
function (i, item) {
str += '<option value="' + item.id + '">' + item.majorname + '</option>'
})
$("#MajorThree").html(str);
},
});
renderForm();
});


//重新渲染表单
function renderForm() {
layui.use('form', function () {
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加()
form.render();
});
//重新渲染表单
function renderForm() {
layui.use('form', function () {
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加()
form.render();
});
}
function formatDateTimesM() {
var date = new Date(1960, 0, 0);
var y = date.getFullYear();
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();

return {
y: y,
m: m,
d: d,
h: h,
min: min
}
function formatDateTimesM() {
var date = new Date(1960, 0, 0);
var y = date.getFullYear();
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();

return {
y: y,
m: m,
d: d,
h: h,
min: min
}
};
</script>
};
</script>
</body>
</html>

+ 6
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/Search.cshtml Parādīt failu

@@ -53,12 +53,16 @@
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteerPhone/server.js")
<script>
//var today = formatDateTimesM();
//var CardNo = $('#txtAccount').val();
layui.use(['form', 'laydate', 'upload'], function () {
var form = layui.form;
//按钮点击
form.on('submit(*)', function (data) {
//var strEntity = JSON.stringify(data.field);
location.href = '/EducationalAdministration/StuVolunteerPhone/SearchResult?&CardNo=' + $('#txtAccount').val() + '&txtPass=' + $('#txtPass').val();
var strEntity = JSON.stringify(data.field);
if (data) {
location.href = '/EducationalAdministration/StuVolunteerPhone/SearchResult?&CardNo=' + $('#txtAccount').val() + '&txtPass=' + $('#txtPass').val();
}
//$.ajax({
// url: '/EducationalAdministration/StuEnrollPhone/SearchForm?type=' + type,
// data: { strEntity: strEntity },


+ 101
- 100
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/SearchResult.cshtml Parādīt failu

@@ -32,6 +32,7 @@
<div class="chickInput">
<span class="chickInputLable"><span>*</span> 姓名</span>
<input type="text" id="StuName" name="StuName" class="layui-input" readonly="readonly">
<input type="text" id="keyValue" name="keyValue" class="layui-input" hidden="hidden">
</div>
<div class="chickInput">
<span class="chickInputLable"><span>*</span> 身份证号</span>
@@ -39,11 +40,11 @@
</div>
<div class="chickInput" >
<span class="chickInputLable"><span>*</span> 是否录取</span>
<input type="text" id="IsAdmission" name="IsAdmission" readonly="readonly">
<input type="text" id="IsEnroll" name="IsEnroll" readonly="readonly">
</div>
</div>
<!-- / chickForm_sec1 -->
@*<div class="chickBtn" lay-submit lay-filter="*">提交</div>*@
<div class="chickBtn" id='btnsubmit' lay-submit lay-filter="*">报名</div>
</form>
</div>
</div>
@@ -57,116 +58,116 @@
<script src="~/Content/layui/layui.all.js"></script>
<script src="~/Content/vue/vue.js"></script>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteerPhone/server.js")
<script>
var StuName = request('StuName');
var CardNo = request('CardNo');
var txtPass = request('txtPass');
var IsEnroll = request('IsEnroll');
layui.use(['form', 'laydate', 'upload'], function () {
var form = layui.form;
//按钮点击
//form.on('submit(*)', function (data) {
// var strEntity = JSON.stringify(data.field);
<script>
var StuName = request('StuName');
var CardNo = request('CardNo');
var txtPass = request('txtPass');
var IsEnroll = request('IsEnroll');
layui.use(['form', 'laydate', 'upload'], function () {
var form = layui.form;
//按钮点击
var keyValue = null;
var strEntity = null;
form.on('submit(*)', function (data) {
location.href = '/EducationalAdministration/StuVolunteerPhone/FormApply?keyValue='+ keyValue;
});

// $.ajax({
// url: '/EducationalAdministration/StuEnrollPhone/SearchForm?type=' + type,
// data: { strEntity: strEntity },
// type: "GET",
// dataType: "json",
// async: true,
// cache: false,
// success: function (data) {
// if (data.code == 200) {
// alert("报名成功,请等待考试通知!");
// } else {
// alert(data.info);
// }
// },
// error: function (XMLHttpRequest, textStatus, errorThrown) {
// },
// beforeSend: function () {
// },
// complete: function () {
// }
// });
// return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
// $.ajax({
// url: '/EducationalAdministration/StuEnrollPhone/SearchForm?type=' + type,
// data: { strEntity: strEntity },
// type: "GET",
// dataType: "json",
// async: true,
// cache: false,
// success: function (data) {
// if (data.code == 200) {
// alert("报名成功,请等待考试通知!");
// } else {
// alert(data.info);
// }
// },
// error: function (XMLHttpRequest, textStatus, errorThrown) {
// },
// beforeSend: function () {
// },
// complete: function () {
// }
// });
// return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。

//});

//var laydate = layui.laydate;
//var laydate = layui.laydate;

//时间选择
//laydate.render({
// elem: '#Birthday',
// min: today.y + '-' + today.m + '-' + today.d
//});
//时间选择
//laydate.render({
// elem: '#Birthday',
// min: today.y + '-' + today.m + '-' + today.d
//});

});
$(window).load(function () {
$('#locdiv').show();
//查询
$.ajax({
url: '/EducationalAdministration/StuVolunteerPhone/SearchForm',
data: { CardNo: CardNo, txtPass: txtPass },
type: "GET",
dataType: "json",
async: true,
cache: false,
success: function (data) {
if (data.code == 200) {
var data = data.data;
if (data.StuEnroll) {
$('#StuName').val(data.StuName);
$('#CardNo').val(data.CardNo);
$('#IsEnroll').val(data.IsEnroll);
if (data.IsEnroll && data.IsEnroll == true) {
$('#IsEnroll').val('是');
} else {
$('#IsEnroll').val('否');
}
});
$(window).load(function () {
//查询
$.ajax({
url: '/EducationalAdministration/StuVolunteerPhone/SearchForm',
data: { CardNo: CardNo, txtPass: txtPass },
type: "GET",
dataType: "json",
async: true,
cache: false,
success: function (data) {
if (data.code == 200) {
var data = data.data.StuVolunteer;
$('#StuName').val(data.StuName);
$('#CardNo').val(data.CardNo);
$('#keyValue').val(data.ID);
$('#keyValue').hide();

if (data.IsEnroll == true) {
$('#IsEnroll').val('是');
} else {
$('#app').html('<img src="/Content/images/jfgrid/nodata.jpg" style="width: 100%;height: 40%;" />');

$('#IsEnroll').val('否');
}
} else {
alert(data.info);
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
},
beforeSend: function () {
},
complete: function () {
} else {
alert(data.info);
}
});
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
},
beforeSend: function () {
},
complete: function () {
}
});

renderForm()
renderForm()

})
})

//重新渲染表单
function renderForm() {
layui.use('form', function () {
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加()
form.render();
});
}
function formatDateTimesM() {
var date = new Date(1960, 0, 0);
var y = date.getFullYear();
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();

//重新渲染表单
function renderForm() {
layui.use('form', function () {
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加()
form.render();
});
return {
y: y,
m: m,
d: d,
h: h,
min: min
}
function formatDateTimesM() {
var date = new Date(1960, 0, 0);
var y = date.getFullYear();
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();

return {
y: y,
m: m,
d: d,
h: h,
min: min
}
};
</script>
};
</script>
</body>
</html>

+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerBLL.cs Parādīt failu

@@ -334,6 +334,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取StuVolunteer表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public StuVolunteerEntity GetCardId(string CardNo)
{
try
{
return stuVolunteerService.GetCardId(CardNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
}
}

+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerIBLL.cs Parādīt failu

@@ -103,6 +103,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

StuVolunteerEntity IsEnrollByCard(string CardNo);

/// <summary>
/// 获取StuVolunteer表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
StuVolunteerEntity GetCardId(string keyValue);
#endregion
}
}

+ 29
- 12
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs Parādīt failu

@@ -173,8 +173,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

#endregion


#region
#region 扩展代码

/// <summary>
/// 去重
@@ -367,16 +366,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
entity.Modify(keyValue);
entity.UpdateTime = DateTime.Now;

}
catch (Exception ex)
{
@@ -401,6 +393,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
entity.Modify(keyValue);
entity.UpdateTime = DateTime.Now;
this.BaseRepository("CollegeMIS").Update(entity);
}
catch (Exception ex)
@@ -433,6 +426,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

/// <summary>
/// 获取StuVolunteer表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public StuVolunteerEntity GetCardId(string CardId)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<StuVolunteerEntity>(x => x.CardNo == CardId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion
}
}

Notiek ielāde…
Atcelt
Saglabāt