@@ -3,6 +3,7 @@ using System.Data; | |||||
using Learun.Application.TwoDevelopment.PersonnelManagement; | using Learun.Application.TwoDevelopment.PersonnelManagement; | ||||
using System.Web.Mvc; | using System.Web.Mvc; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System; | |||||
namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | ||||
{ | { | ||||
@@ -37,6 +38,24 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 表单页-查看 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormView() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 主页面-审核 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult CheckIndex() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -103,7 +122,8 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
WorkStudyPositionApplyEntity entity = strEntity.ToObject<WorkStudyPositionApplyEntity>(); | WorkStudyPositionApplyEntity entity = strEntity.ToObject<WorkStudyPositionApplyEntity>(); | ||||
entity.CheckStatus = false; | |||||
entity.CreateTime = DateTime.Now; | |||||
entity.CreateUserId = LoginUserInfo.Get().userId; | |||||
workStudyPositionApplyIBLL.SaveEntity(keyValue, entity); | workStudyPositionApplyIBLL.SaveEntity(keyValue, entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
@@ -115,7 +135,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult DoCheck(string keyValue, bool checkStatus) | |||||
public ActionResult DoCheck(string keyValue, string checkStatus) | |||||
{ | { | ||||
var entity = workStudyPositionApplyIBLL.GetWorkStudyPositionApplyEntity(keyValue); | var entity = workStudyPositionApplyIBLL.GetWorkStudyPositionApplyEntity(keyValue); | ||||
if (entity == null) | if (entity == null) | ||||
@@ -123,6 +143,8 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
return Fail("数据不存在!"); | return Fail("数据不存在!"); | ||||
} | } | ||||
entity.CheckStatus = checkStatus; | entity.CheckStatus = checkStatus; | ||||
entity.CheckTime = DateTime.Now; | |||||
entity.CheckUserId = LoginUserInfo.Get().userId; | |||||
workStudyPositionApplyIBLL.SaveEntity(keyValue, entity); | workStudyPositionApplyIBLL.SaveEntity(keyValue, entity); | ||||
return Success("操作成功!"); | return Success("操作成功!"); | ||||
} | } | ||||
@@ -62,6 +62,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetList(string queryJson) | |||||
{ | |||||
var data = workStudyPositionIBLL.GetList("{\"Status\":\"1\"}"); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取表单数据 | /// 获取表单数据 | ||||
/// <summary> | /// <summary> | ||||
@@ -0,0 +1,40 @@ | |||||
@{ | |||||
ViewBag.Title = "岗位申请"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout " > | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学生</div> | |||||
<div id="StuId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">岗位名称</div> | |||||
<div id="PositionId"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"></i> 审核通过</a> | |||||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-unlock"></i> 审核不通过</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/WorkStudyPositionApply/CheckIndex.js") |
@@ -0,0 +1,108 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-03-04 16:01 | |||||
* 描 述:岗位申请 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#StuId').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); | |||||
$('#PositionId').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/GetList', | |||||
value: "Id", | |||||
text: "Name" | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 查看 | |||||
$('#lr_view').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formview', | |||||
title: '查看', | |||||
url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/FormView?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 审核 | |||||
$('#lr_check').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认审核通过该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: "1" }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 去审核 | |||||
$('#lr_uncheck').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认审核不通过该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: "2" }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/GetPageList', | |||||
headData: [ | |||||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||||
{ label: "学生学号", name: "StuNo", width: 100, align: "left" }, | |||||
{ label: "所属专业", name: "MajorName", width: 100, align: "left" }, | |||||
{ label: "所属班级", name: "ClassName", width: 100, align: "left" }, | |||||
{ label: "岗位名称", name: "Name", width: 100, align: "left" }, | |||||
{ label: "薪资(元/月)", name: "Salary", width: 100, align: "left" }, | |||||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||||
{ label: "申请时间", name: "ApplyTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "申请状态", name: "CheckStatus", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == 1 ? "通过" : cellvalue == 2 ? "未通过" : "待审核"; | |||||
} | |||||
}, | |||||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||||
], | |||||
mainId: 'Id', | |||||
isPage: true, | |||||
sidx: 'CreateTime desc' | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
page.search(); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -3,17 +3,21 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPositionApply" > | |||||
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPositionApply"> | |||||
<div class="lr-form-item-title">学生<font face="宋体">*</font></div> | <div class="lr-form-item-title">学生<font face="宋体">*</font></div> | ||||
<div id="Student" isvalid="yes" checkexpession="NotNull" ></div> | |||||
<div id="StuId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPositionApply" > | |||||
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPositionApply"> | |||||
<div class="lr-form-item-title">岗位名称<font face="宋体">*</font></div> | <div class="lr-form-item-title">岗位名称<font face="宋体">*</font></div> | ||||
<input id="PositionName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
<div id="PositionId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPositionApply" > | |||||
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPositionApply"> | |||||
<div class="lr-form-item-title">申请时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">申请时间<font face="宋体">*</font></div> | ||||
<input id="ApplyTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#ApplyTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="ApplyTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#ApplyTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPositionApply"> | |||||
<div class="lr-form-item-title">申请说明</div> | |||||
<textarea id="ApplyReason" class="form-control" style="height:100px;"></textarea> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Form.js") | @Html.AppendJsFile("/Areas/PersonnelManagement/Views/WorkStudyPositionApply/Form.js") |
@@ -15,7 +15,13 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#Student').lrDataSourceSelect({ code: 'StuInfoBasic',value: 'stuno',text: 'stuname' }); | |||||
$('#StuId').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); | |||||
$('#PositionId').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/GetList', | |||||
value: "Id", | |||||
text: "Name" | |||||
}); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -0,0 +1,23 @@ | |||||
@{ | |||||
ViewBag.Title = "岗位申请"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap"> | |||||
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPositionApply"> | |||||
<div class="lr-form-item-title">学生<font face="宋体">*</font></div> | |||||
<div id="StuId" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPositionApply"> | |||||
<div class="lr-form-item-title">岗位名称<font face="宋体">*</font></div> | |||||
<div id="PositionId" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPositionApply"> | |||||
<div class="lr-form-item-title">申请时间<font face="宋体">*</font></div> | |||||
<input id="ApplyTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="WorkStudyPositionApply"> | |||||
<div class="lr-form-item-title">申请说明</div> | |||||
<textarea id="ApplyReason" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/WorkStudyPositionApply/FormView.js") |
@@ -0,0 +1,57 @@ | |||||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-03-04 16:01 | |||||
* 描 述:岗位申请 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#StuId').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); | |||||
$('#PositionId').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/GetList', | |||||
value: "Id", | |||||
text: "Name" | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -12,11 +12,11 @@ | |||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">学生</div> | <div class="lr-form-item-title">学生</div> | ||||
<div id="Student"></div> | |||||
<div id="StuId"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">岗位名称</div> | <div class="lr-form-item-title">岗位名称</div> | ||||
<input id="PositionName" type="text" class="form-control" /> | |||||
<div id="PositionId"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -31,10 +31,6 @@ | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"></i> 审核</a> | |||||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-unlock"></i> 去审核</a> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-body" id="gridtable"></div> | <div class="lr-layout-body" id="gridtable"></div> | ||||
@@ -16,7 +16,13 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#Student').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); | |||||
$('#StuId').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); | |||||
$('#PositionId').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPosition/GetList', | |||||
value: "Id", | |||||
text: "Name" | |||||
}); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -38,6 +44,11 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||||
if (CheckStatus == 1 || CheckStatus == 2) { | |||||
learun.alert.warning("当前项目已审核!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
@@ -52,84 +63,47 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
// 删除 | // 删除 | ||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 审核 | |||||
$('#lr_check').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | ||||
if (CheckStatus == true) { | |||||
if (CheckStatus == 1 || CheckStatus == 2) { | |||||
learun.alert.warning("当前项目已审核!"); | learun.alert.warning("当前项目已审核!"); | ||||
return false; | return false; | ||||
} | } | ||||
learun.layerConfirm('是否确认审核该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: true }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 去审核 | |||||
$('#lr_uncheck').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||||
if (CheckStatus != true) { | |||||
learun.alert.warning("当前项目未审核!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认审核该项!', function (res) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DoCheck', { keyValue: keyValue, checkStatus: false }, function () { | |||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | refreshGirdData(); | ||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/GetPageList', | url: top.$.rootUrl + '/PersonnelManagement/WorkStudyPositionApply/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ | |||||
label: "学生", name: "Student", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||||
key: value, | |||||
keyId: 'stuno', | |||||
callback: function (_data) { | |||||
callback(_data['stuname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "岗位名称", name: "PositionName", width: 100, align: "left" }, | |||||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||||
{ label: "学生学号", name: "StuNo", width: 100, align: "left" }, | |||||
{ label: "所属专业", name: "MajorName", width: 100, align: "left" }, | |||||
{ label: "所属班级", name: "ClassName", width: 100, align: "left" }, | |||||
{ label: "岗位名称", name: "Name", width: 100, align: "left" }, | |||||
{ label: "薪资(元/月)", name: "Salary", width: 100, align: "left" }, | |||||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||||
{ label: "申请时间", name: "ApplyTime", width: 130, align: "left" }, | { label: "申请时间", name: "ApplyTime", width: 130, align: "left" }, | ||||
{ | { | ||||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||||
label: "申请状态", name: "CheckStatus", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | formatter: function (cellvalue) { | ||||
return cellvalue == true ? "已审核" : "未审核"; | |||||
return cellvalue == 1 ? "通过" : cellvalue == 2 ? "未通过" : "待审核"; | |||||
} | } | ||||
}, | }, | ||||
], | ], | ||||
mainId: 'Id', | mainId: 'Id', | ||||
isPage: true | |||||
isPage: true, | |||||
sidx: 'CreateTime desc' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
@@ -1413,6 +1413,8 @@ | |||||
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" /> | <Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" /> | <Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" /> | <Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\FormView.js" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\CheckIndex.js" /> | |||||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerIndex.js" /> | <Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerIndex.js" /> | ||||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerQuery.js" /> | <Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerQuery.js" /> | ||||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\Form.js" /> | <Content Include="Areas\StudentWork\Views\SW_Ask_Main\Form.js" /> | ||||
@@ -7236,6 +7238,8 @@ | |||||
<Content Include="Areas\PersonnelManagement\Views\LeagueMember\ModifyForm.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\LeagueMember\ModifyForm.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuSubsideManage\CheckForm.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuSubsideManage\CheckForm.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuSubsideManage\CheckIndex.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuSubsideManage\CheckIndex.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\FormView.cshtml" /> | |||||
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\CheckIndex.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | ||||
@@ -1,5 +1,5 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||||
<?PowerDesigner AppLocale="UTF16" ID="{88086B01-C9E1-11D4-9552-0090277716A9}" Label="" LastModificationDate="1624615891" Name="Physical Data Model 1" Objects="3558" Symbols="402" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?> | |||||
<?PowerDesigner AppLocale="UTF16" ID="{88086B01-C9E1-11D4-9552-0090277716A9}" Label="" LastModificationDate="1624958582" Name="Physical Data Model 1" Objects="3540" Symbols="402" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?> | |||||
<!-- do not edit this file --> | <!-- do not edit this file --> | ||||
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object"> | <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object"> | ||||
@@ -35905,11 +35905,11 @@ B9AF | |||||
<o:Column Id="o2255"> | <o:Column Id="o2255"> | ||||
<a:ObjectID>A57AC16B-5B75-4595-BBFA-AB30028DEB0B</a:ObjectID> | <a:ObjectID>A57AC16B-5B75-4595-BBFA-AB30028DEB0B</a:ObjectID> | ||||
<a:Name>学生</a:Name> | <a:Name>学生</a:Name> | ||||
<a:Code>Student</a:Code> | |||||
<a:Code>StuId</a:Code> | |||||
<a:CreationDate>1583230375</a:CreationDate> | <a:CreationDate>1583230375</a:CreationDate> | ||||
<a:Creator>admin</a:Creator> | <a:Creator>admin</a:Creator> | ||||
<a:ModificationDate>1583230479</a:ModificationDate> | |||||
<a:Modifier>admin</a:Modifier> | |||||
<a:ModificationDate>1624958582</a:ModificationDate> | |||||
<a:Modifier>edz</a:Modifier> | |||||
<a:Comment>学生</a:Comment> | <a:Comment>学生</a:Comment> | ||||
<a:DataType>nvarchar(50)</a:DataType> | <a:DataType>nvarchar(50)</a:DataType> | ||||
<a:Length>50</a:Length> | <a:Length>50</a:Length> | ||||
@@ -35917,11 +35917,11 @@ B9AF | |||||
<o:Column Id="o2256"> | <o:Column Id="o2256"> | ||||
<a:ObjectID>85DC7815-F863-4B48-8012-EA76D0D1EA61</a:ObjectID> | <a:ObjectID>85DC7815-F863-4B48-8012-EA76D0D1EA61</a:ObjectID> | ||||
<a:Name>岗位名称</a:Name> | <a:Name>岗位名称</a:Name> | ||||
<a:Code>PositionName</a:Code> | |||||
<a:Code>PositionId</a:Code> | |||||
<a:CreationDate>1583230375</a:CreationDate> | <a:CreationDate>1583230375</a:CreationDate> | ||||
<a:Creator>admin</a:Creator> | <a:Creator>admin</a:Creator> | ||||
<a:ModificationDate>1583230479</a:ModificationDate> | |||||
<a:Modifier>admin</a:Modifier> | |||||
<a:ModificationDate>1624958582</a:ModificationDate> | |||||
<a:Modifier>edz</a:Modifier> | |||||
<a:Comment>岗位名称</a:Comment> | <a:Comment>岗位名称</a:Comment> | ||||
<a:DataType>nvarchar(50)</a:DataType> | <a:DataType>nvarchar(50)</a:DataType> | ||||
<a:Length>50</a:Length> | <a:Length>50</a:Length> | ||||
@@ -42,6 +42,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<WorkStudyPositionEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return workStudyPositionService.GetList(queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取WorkStudyPosition表实体数据 | /// 获取WorkStudyPosition表实体数据 | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -21,6 +21,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// <param name="queryJson">查询参数</param> | /// <param name="queryJson">查询参数</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<WorkStudyPositionEntity> GetPageList(Pagination pagination, string queryJson); | IEnumerable<WorkStudyPositionEntity> GetPageList(Pagination pagination, string queryJson); | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<WorkStudyPositionEntity> GetList(string queryJson); | |||||
/// <summary> | /// <summary> | ||||
/// 获取WorkStudyPosition表实体数据 | /// 获取WorkStudyPosition表实体数据 | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -55,6 +55,42 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// <summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<WorkStudyPositionEntity> GetList(string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT t.*"); | |||||
strSql.Append(" FROM WorkStudyPosition t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["Status"].IsEmpty()) | |||||
{ | |||||
dp.Add("Status", queryParam["Status"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Status = @Status "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<WorkStudyPositionEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取WorkStudyPosition表实体数据 | /// 获取WorkStudyPosition表实体数据 | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -13,32 +13,67 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// </summary> | /// </summary> | ||||
public class WorkStudyPositionApplyEntity | public class WorkStudyPositionApplyEntity | ||||
{ | { | ||||
#region 实体成员 | |||||
/// <summary> | |||||
/// 主键 | |||||
/// </summary> | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// 主键 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("ID")] | [Column("ID")] | ||||
public string Id { get; set; } | public string Id { get; set; } | ||||
/// <summary> | |||||
/// 学生 | |||||
/// </summary> | |||||
[Column("STUDENT")] | |||||
public string Student { get; set; } | |||||
/// <summary> | |||||
/// 岗位名称 | |||||
/// </summary> | |||||
[Column("POSITIONNAME")] | |||||
public string PositionName { get; set; } | |||||
/// <summary> | |||||
/// 申请时间 | |||||
/// </summary> | |||||
/// <summary> | |||||
/// 学生 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("STUID")] | |||||
public string StuId { get; set; } | |||||
/// <summary> | |||||
/// 岗位名称 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("POSITIONID")] | |||||
public string PositionId { get; set; } | |||||
/// <summary> | |||||
/// 申请时间 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("APPLYTIME")] | [Column("APPLYTIME")] | ||||
public DateTime? ApplyTime { get; set; } | public DateTime? ApplyTime { get; set; } | ||||
/// <summary> | |||||
/// 审核状态 | |||||
/// </summary> | |||||
/// <summary> | |||||
/// 申请说明 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("APPLYREASON")] | |||||
public string ApplyReason { get; set; } | |||||
/// <summary> | |||||
/// 审核状态 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("CHECKSTATUS")] | [Column("CHECKSTATUS")] | ||||
public bool? CheckStatus { get; set; } | |||||
public string CheckStatus { get; set; } | |||||
/// <summary> | |||||
/// 审核时间 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("CHECKTIME")] | |||||
public DateTime? CheckTime { get; set; } | |||||
/// <summary> | |||||
/// 审核人 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("CHECKUSERID")] | |||||
public string CheckUserId { get; set; } | |||||
/// <summary> | |||||
/// 创建用户 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("CREATEUSERID")] | |||||
public string CreateUserId { get; set; } | |||||
/// <summary> | |||||
/// 创建时间 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -59,6 +94,26 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展字段 | #region 扩展字段 | ||||
[NotMapped] | |||||
public string StuNo { get; set; } | |||||
[NotMapped] | |||||
public string StuName { get; set; } | |||||
[NotMapped] | |||||
public string MajorNo { get; set; } | |||||
[NotMapped] | |||||
public string ClassNo { get; set; } | |||||
[NotMapped] | |||||
public string Name { get; set; } | |||||
[NotMapped] | |||||
public string Salary { get; set; } | |||||
[NotMapped] | |||||
public string Semester { get; set; } | |||||
[NotMapped] | |||||
public string MajorName { get; set; } | |||||
[NotMapped] | |||||
public string ClassName { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -29,28 +29,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
try | try | ||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.Student, | |||||
t.PositionName, | |||||
t.ApplyTime, | |||||
t.CheckStatus | |||||
"); | |||||
strSql.Append("SELECT t.*,s.StuNo,s.StuName,s.MajorNo,s.ClassNo,p.Name,p.Salary,p.Semester,m.MajorName,c.ClassName "); | |||||
strSql.Append(" FROM WorkStudyPositionApply t "); | strSql.Append(" FROM WorkStudyPositionApply t "); | ||||
strSql.Append(" left join StuInfoBasic s on t.StuId=s.StuId "); | |||||
strSql.Append(" left join CdMajor m on s.MajorNo=m.MajorNo "); | |||||
strSql.Append(" left join ClassInfo c on s.ClassNo=c.ClassNo "); | |||||
strSql.Append(" left join WorkStudyPosition p on t.PositionId=p.Id "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["Student"].IsEmpty()) | |||||
if (!queryParam["StuId"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("Student",queryParam["Student"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Student = @Student "); | |||||
dp.Add("StuId", queryParam["StuId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.StuId = @StuId "); | |||||
} | } | ||||
if (!queryParam["PositionName"].IsEmpty()) | |||||
if (!queryParam["PositionId"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("PositionName", "%" + queryParam["PositionName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.PositionName Like @PositionName "); | |||||
dp.Add("PositionId", queryParam["PositionId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.PositionId = @PositionId "); | |||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<WorkStudyPositionApplyEntity>(strSql.ToString(),dp, pagination); | return this.BaseRepository("CollegeMIS").FindList<WorkStudyPositionApplyEntity>(strSql.ToString(),dp, pagination); | ||||
} | } | ||||