Browse Source

教师证书管理

枝江中职分支
ndbs 2 months ago
parent
commit
055919d0eb
6 changed files with 119 additions and 43 deletions
  1. +12
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Form.cshtml
  2. +33
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Form.js
  3. +6
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Index.cshtml
  4. +51
    -31
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Index.js
  5. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateEntity.cs
  6. +12
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateService.cs

+ 12
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Form.cshtml View File

@@ -3,24 +3,29 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="TeacherCertificate">
<div class="col-xs-6 lr-form-item" data-table="TeacherCertificate">
<div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div>
<div id="TCNo" isvalid="yes" checkexpession="NotNull"></div>
<input id="TCName" hidden="hidden" />
<div id="TCName" isvalid="yes" checkexpession="NotNull"></div>
<input id="TCNo" hidden="hidden" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TeacherCertificate">
<div class="col-xs-6 lr-form-item" data-table="TeacherCertificate">
<div class="lr-form-item-title">部门</div>
<div id="Department" readonly></div>
@*<div id="DeptNo" isvalid="yes" checkexpession="NotNull" readonly></div>*@
</div>
<div class="col-xs-6 lr-form-item" data-table="TeacherCertificate">
<div class="lr-form-item-title">证书名称<font face="宋体">*</font></div>
<input id="TCType" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TeacherCertificate">
<div class="col-xs-6 lr-form-item" data-table="TeacherCertificate">
<div class="lr-form-item-title">证书编号<font face="宋体">*</font></div>
<input id="TCCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TeacherCertificate">
<div class="col-xs-6 lr-form-item" data-table="TeacherCertificate">
<div class="lr-form-item-title">资格种类</div>
<div id="TCTypeID"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TeacherCertificate">
<div class="col-xs-6 lr-form-item" data-table="TeacherCertificate">
<div class="lr-form-item-title">任教学科</div>
<div id="TCClass"></div>
</div>


+ 33
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Form.js View File

@@ -16,9 +16,41 @@ var bootstrap = function ($, learun) {
},
bind: function () {
$('#TCTypeID').lrDataItemSelect({ code: 'jszgzl' });
$('#TCNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' });
$('#FilePath').lrUploader();
$('#TCClass').lrDataItemSelect({ code: 'xkfl' });
$('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
$('#TCName').lrGirdSelect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=teacheruserdata',
height: 500,
width: 400,
selectWord: 'f_realname',
value: 'f_realname',
text: 'f_realname',
headData:
[
{ label: "编号", name: "f_encode", width: 100, align: "left" },
{ label: "姓名", name: "f_realname", width: 100, align: "left" },
{
label: "部门", name: "f_departmentid", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
],
select: function (item) {
////赋值
$("#TCNo").val(item.f_encode);
$("#TCName").val(item.f_realname);
$("#Department").lrselectSet(item.f_departmentid);
}
});
},
initData: function () {
if (!!keyValue) {


+ 6
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Index.cshtml View File

@@ -18,13 +18,17 @@
<div id="TCNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">证书名称</div>
<input id="TCType" type="text" class="form-control" />
<div class="lr-form-item-title">部门</div>
<div id="Department"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">资格种类</div>
<div id="TCTypeID"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">任教学科</div>
<div id="TCClass"></div>
</div>
</div>
</div>
</div>


+ 51
- 31
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Index.js View File

@@ -7,8 +7,8 @@
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
//var startTime;
//var endTime;
var page = {
init: function () {
page.initGird();
@@ -19,32 +19,32 @@ var bootstrap = function ($, learun) {
page.search(queryJson);
}, 220, 400);
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
//$('#datesearch').lrdate({
// dfdata: [
// { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
// { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
// { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
// { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
// ],
// // 月
// mShow: false,
// premShow: false,
// // 季度
// jShow: false,
// prejShow: false,
// // 年
// ysShow: false,
// yxShow: false,
// preyShow: false,
// yShow: false,
// // 默认
// dfvalue: '1',
// selectfn: function (begin, end) {
// startTime = begin;
// endTime = end;
// page.search();
// }
//});
$('#TCNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo',
@@ -53,6 +53,8 @@ var bootstrap = function ($, learun) {
text: "empname"
});
$('#TCTypeID').lrDataItemSelect({ code: 'jszgzl' });
$('#TCClass').lrDataItemSelect({ code: 'xkfl' });
$('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
@@ -109,8 +111,21 @@ var bootstrap = function ($, learun) {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/TeacherCertificate/GetPageList',
headData: [
{ label: "教师编号", name: "TCNo", width: 150, align: "left" },
{ label: "教师姓名", name: "TCName", width: 100, align: "left" },
{ label: "教师编号", name: "f_encode", width: 150, align: "left" },
{ label: "教师姓名", name: "f_realname", width: 100, align: "left" },
{
label: "部门", name: "f_departmentid", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{ label: "证书名称", name: "TCType", width: 150, align: "left" },
{ label: "证书编号", name: "TCCode", width: 150, align: "left" },
{
@@ -137,7 +152,12 @@ var bootstrap = function ($, learun) {
});
}
},
{ label: "批准时间", name: "TCTime", width: 100, align: "left" },
{
label: "批准时间", name: "TCTime", width: 100, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
}
},
{ label: "批准单位", name: "TCUnit", width: 100, align: "left" },
{ label: "批准文号", name: "TCNum", width: 100, align: "left" },
],


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateEntity.cs View File

@@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
[Column("TCNAME")]
public string TCName { get; set; }
/// <summary>
/// 部门
/// </summary>
[Column("DEPARTMENT")]
public string Department { get; set; }
/// <summary>
/// 证书名称
/// </summary>
[Column("TCTYPE")]


+ 12
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateService.cs View File

@@ -56,7 +56,17 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
dp.Add("TCTypeID", queryParam["TCTypeID"].ToString(), DbType.String);
strSql.Append(" AND t.TCTypeID=@TCTypeID ");
}
return this.BaseRepository().FindList<TeacherCertificateEntity>(strSql.ToString(),dp, pagination);
if (!queryParam["Department"].IsEmpty())
{
dp.Add("Department", queryParam["Department"].ToString(), DbType.String);
strSql.Append(" AND t.Department=@Department ");
}
if (!queryParam["TCClass"].IsEmpty())
{
dp.Add("TCClass", queryParam["TCClass"].ToString(), DbType.String);
strSql.Append(" AND t.TCClass=@TCClass ");
}
return this.BaseRepository().FindList<TeacherCertificateEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -108,7 +118,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
try
{
this.BaseRepository().Delete<TeacherCertificateEntity>(t=>t.TCID == keyValue);
this.BaseRepository().Delete<TeacherCertificateEntity>(t => t.TCID == keyValue);
}
catch (Exception ex)
{


Loading…
Cancel
Save