@@ -50,7 +50,16 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult ExamineForm() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -171,11 +180,13 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Check(string keyValue) | |||
public ActionResult Check(string keyValue,string strEntity) | |||
{ | |||
var keyValueArr = keyValue.Split(','); | |||
var keyValues = "'" + string.Join("','", keyValueArr) + "'"; | |||
visitorInfoIBLL.Check(keyValues); | |||
//var keyValueArr = keyValue.Split(','); | |||
//var keyValues = "'" + string.Join("','", keyValueArr) + "'"; | |||
VisitorInfoEntity entity = strEntity.ToObject<VisitorInfoEntity>(); | |||
visitorInfoIBLL.Check(keyValue, entity.VExamineRemarks); | |||
return Success("审核成功!"); | |||
} | |||
@@ -0,0 +1,13 @@ | |||
@{ | |||
ViewBag.Title = "访客管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="VisitorInfo"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="VExamineRemarks" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/VisitorInfo/ExamineForm.js") |
@@ -0,0 +1,54 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-05-17 10:11 | |||
* 描 述:访客管理 | |||
*/ | |||
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 () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/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()) | |||
}; | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/Check?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -84,7 +84,7 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/DeleteForm', { keyValue: keyValue}, function () { | |||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
@@ -98,19 +98,27 @@ var bootstrap = function ($, learun) { | |||
//审核 | |||
$('#lr_lock').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('VID'); | |||
if (keyValue.indexOf(',') > 0) { | |||
learun.alert.warning("只能选中一条记录审核!"); | |||
return; | |||
} | |||
if (learun.checkrow(keyValue)) { | |||
var VState = $('#gridtable').jfGridValue('VState'); | |||
if (VState.indexOf('1') != -1) { | |||
learun.alert.warning("选中记录中包含已审核项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认审核该项?', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/Check', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '审核', | |||
url: top.$.rootUrl + '/PersonnelManagement/VisitorInfo/ExamineForm?keyValue=' + keyValue, | |||
width: 550, | |||
height: 330, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
//去审 | |||
@@ -119,7 +127,6 @@ var bootstrap = function ($, learun) { | |||
if (learun.checkrow(keyValue)) { | |||
var VState = $('#gridtable').jfGridValue('VState'); | |||
var VStateArr = VState.split(','); | |||
console.log("VStateArr", VStateArr); | |||
if ($.inArray('0', VStateArr) != -1 || $.inArray('', VStateArr) != -1) { | |||
learun.alert.warning("选中记录中包含未审核项目!"); | |||
return; | |||
@@ -159,20 +166,20 @@ var bootstrap = function ($, learun) { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/PersonnelManagement/VisitorInfo/GetPageList', | |||
headData: [ | |||
{ label: "姓名", name: "VName", width: 100, align: "left"}, | |||
{ label: "手机号", name: "VPhone", width: 100, align: "left"}, | |||
{ label: "申请理由", name: "VReasons", width: 100, align: "left"}, | |||
{ label: "来访目的", name: "VObjective", width: 100, align: "left"}, | |||
{ label: "姓名", name: "VName", width: 100, align: "left" }, | |||
{ label: "手机号", name: "VPhone", width: 100, align: "left" }, | |||
{ label: "申请理由", name: "VReasons", width: 100, align: "left" }, | |||
{ label: "来访目的", name: "VObjective", width: 100, align: "left" }, | |||
{ label: "备注", name: "VRemarks", width: 100, align: "left" }, | |||
{ | |||
label: "审核标志", name: "VState", width: 80, align: "left", | |||
label: "状态", name: "VState", width: 80, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>"; | |||
} | |||
} | |||
], | |||
mainId:'VID', | |||
mainId: 'VID', | |||
isPage: true, | |||
isMultiselect: true, | |||
}); | |||
@@ -181,7 +188,7 @@ var bootstrap = function ($, learun) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
@@ -1415,6 +1415,7 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\ExamineForm.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\fromAdd.css" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerIndex.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerQuery.js" /> | |||
@@ -7288,6 +7289,7 @@ | |||
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\LeaderLeaveFiling.cshtml" /> | |||
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\LeaderLeaveFilingMonitor.cshtml" /> | |||
<Content Include="Areas\LR_NewWorkFlow\Views\NWFProcess\LeaveFilingMonitor.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\VisitorInfo\ExamineForm.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -191,11 +191,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// 去审 | |||
/// </summary> | |||
/// <returns></returns> | |||
public void Check(string keyValues) | |||
public void Check(string keyValues,string VExamineRemarks) | |||
{ | |||
try | |||
{ | |||
visitorInfoService.Check(keyValues); | |||
visitorInfoService.Check(keyValues, VExamineRemarks); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -44,6 +44,14 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// </summary> | |||
[Column("VREMARKS")] | |||
public string VRemarks { get; set; } | |||
/// <summary> | |||
/// 审核备注 | |||
/// </summary> | |||
[Column("VEXAMINEREMARKS")] | |||
public string VExamineRemarks { get; set; } | |||
/// <summary> | |||
/// 申请时间 | |||
/// </summary> | |||
@@ -60,7 +60,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// 审核 | |||
/// </summary> | |||
/// <param name="keyValues"></param> | |||
void Check(string keyValues); | |||
void Check(string keyValues,string VExamineRemarks); | |||
/// <summary> | |||
/// 生成账号 | |||
@@ -233,11 +233,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// <summary> | |||
/// 审核 | |||
/// </summary> | |||
public void Check(string keyValues) | |||
public void Check(string keyValues, string VExamineRemarks) | |||
{ | |||
try | |||
{ | |||
string sql = $"update VisitorInfo set VState=1 where VID in ({keyValues})"; | |||
string sql = $"update VisitorInfo set VState=1,VExamineRemarks='{VExamineRemarks}' where VID in ('{keyValues}')"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||