Przeglądaj źródła

公章申请审批、公章日志

yanshi
zhangli 3 lat temu
rodzic
commit
861e1331ac
11 zmienionych plików z 150 dodań i 16 usunięć
  1. +13
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/OfficialSealController.cs
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSeal/Index.cshtml
  3. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSeal/Index.js
  4. +27
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealRecord/Index.js
  5. +6
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealUse/Index.js
  6. +25
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealBLL.cs
  7. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealIBLL.cs
  8. +41
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealService.cs
  9. +1
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealRecord/OfficialSealRecordService.cs
  10. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealUse/OfficialSealUseEntity.cs
  11. +11
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealUse/OfficialSealUseService.cs

+ 13
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/OfficialSealController.cs Wyświetl plik

@@ -106,7 +106,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
var entity = officialSealIBLL.GetOfficialSealEntity(keyValue);
entity.Enable = Enable;
officialSealIBLL.SaveEntity(keyValue, entity);
return Success("删除成功!");
return Success("操作成功!");
}
/// <summary>
///
@@ -121,6 +121,18 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
return Success("操作成功!");
}
/// <summary>
/// 归还
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Return(string keyValue)
{
officialSealIBLL.Return(keyValue);
return Success("操作成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSeal/Index.cshtml Wyświetl plik

@@ -41,6 +41,7 @@
<li id="lr_disable"><a><i></i>&nbsp;<span class="lrlt">禁用</span></a></li>
<li id="lr_loss"><a><i></i>&nbsp;<span class="lrlt">挂失</span></a></li>
<li id="lr_noloss"><a><i></i>&nbsp;<span class="lrlt">取消挂失</span></a></li>
<li id="lr_return"><a><i></i>&nbsp;<span class="lrlt">归还</span></a></li>
<li id="lr_xh"><a><i></i>&nbsp;<span class="lrlt">销毁</span></a></li>
</ul>



+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSeal/Index.js Wyświetl plik

@@ -138,6 +138,24 @@ var bootstrap = function ($, learun) {
});
}
});

// 归还
$('#lr_return').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 1) {
return learun.alert.warning('未借出无需归还!');
}
learun.layerConfirm('是否确认归还该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/OfficialSeal/Return', { keyValue: keyValue, Status: 0 }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();


+ 27
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealRecord/Index.js Wyświetl plik

@@ -15,7 +15,7 @@ var bootstrap = function ($, learun) {
bind: function () {
// 初始化左侧树形数据
$('#dataTree').lrtree({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetTree?code=OfficialSealData&parentId=type&Id=id&showId=name',
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetTree?code=OfficialSealInfo&parentId=type&Id=id&showId=name',
nodeClick: function (item) {
page.search({ SealId: item.value });
}
@@ -73,7 +73,7 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/CustomFunction/OfficialSealRecord/GetPageList',
headData: [
{ label: "公章类型", name: "SealType", width: 100, align: "left",
@@ -89,17 +89,39 @@ var bootstrap = function ($, learun) {
{ label: "公章名称", name: "SealId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'OfficialSealData',
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'OfficialSealInfo',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}},
}
},
{
label: "状态", name: "Status", width: 100, align: "left",
formatter: function (cellvalue) {
if (cellvalue == '0') {
return '<span class=\"label label-success\">正常</span>';
} else if (cellvalue == '1') {
return '<span class=\"label label-warning\">借出</span>';
} else if (cellvalue == '2') {
return '<span class=\"label label-danger\">挂失</span>';
} else if (cellvalue == '3') {
return '<span class=\"label label-success\">归还</span>';
}else if (cellvalue == '99') {
return '<span class=\"label label-danger\">销毁</span>';
}

}
},
{ label: "申请人", name: "ApplyUserName", width: 100, align: "left" },
{ label: "申请时间", name: "ApplyTime", width: 150, align: "left" },
],
mainId:'Id',
isPage: true
isPage: true,
sidx: 'ApplyTime',
sord: 'ASC',
});
page.search();
},


+ 6
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/OfficialSealUse/Index.js Wyświetl plik

@@ -72,8 +72,12 @@ var bootstrap = function ($, learun) {
// 提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var status = $('#gridtable').jfGridValue('Status');
if (status != '0') {
return learun.alert.warning('只有草稿状态才可提交!');
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/CustomFunction/OfficialSealUse/UpdateStatus', { keyValue: keyValue, Status: 1 }, function () {
@@ -151,7 +155,7 @@ var bootstrap = function ($, learun) {
if (cellvalue == 0) {
return "<span class=\"label label-default\">草稿</span>";
} else if (cellvalue == 1) {
return "<span class=\"label label-success\">审批中</span>";
return "<span class=\"label label-success\">进行中</span>";
} else if (cellvalue == 2) {
return "<span class=\"label label-warning\">已通过</span>";
} else if (cellvalue == 99) {


+ 25
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealBLL.cs Wyświetl plik

@@ -116,6 +116,31 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
}
}


/// <summary>
///
/// </summary>
/// <param name="keyValue">主键</param>
public void Return(string keyValue)
{
try
{
officialSealService.Return(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealIBLL.cs Wyświetl plik

@@ -48,6 +48,11 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
/// <param name="keyValue"></param>
/// <param name="Status"></param>
void UpdateStatus(string keyValue, string Status);
/// <summary>
/// 归还
/// </summary>
/// <param name=""></param>
void Return(string keyValue);
#endregion

}


+ 41
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSeal/OfficialSealService.cs Wyświetl plik

@@ -144,6 +144,47 @@ t.Status
}
}
}


/// <summary>
/// 归还
/// </summary>
/// <param name="keyValue">主键</param>
public void Return(string keyValue)
{
try
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
var entity = this.BaseRepository("CollegeMIS").FindEntity<OfficialSealEntity>(keyValue);
entity.Status = "0";
db.Update(entity);

var userInfo = LoginUserInfo.Get();
OfficialSealRecordEntity RecordEntity = new OfficialSealRecordEntity();
RecordEntity.Create();
RecordEntity.SealId = entity.Id;
RecordEntity.SealType = entity.Type;
RecordEntity.Status = 3;//归还
RecordEntity.ApplyUserId = userInfo.userId;
RecordEntity.ApplyUserName = userInfo.realName;
RecordEntity.ApplyTime = DateTime.Now;
db.Insert(RecordEntity);

db.Commit();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 1
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealRecord/OfficialSealRecordService.cs Wyświetl plik

@@ -32,9 +32,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.SealType,
t.SealId
t.*
");
strSql.Append(" FROM OfficialSealRecord t ");
strSql.Append(" WHERE 1=1 ");


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealUse/OfficialSealUseEntity.cs Wyświetl plik

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
/// 日 期:2021-06-09 16:19
/// 描 述:公章申请审批
/// </summary>
public class OfficialSealUseEntity
public class OfficialSealUseEntity
{
#region 实体成员
/// <summary>
@@ -64,7 +64,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
{
this.Id = Guid.NewGuid().ToString();
this.Status = 0;
this.ApplyUserName = LoginUserInfo.Get().realName;
}
/// <summary>
/// 编辑调用


+ 11
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/OfficialSealUse/OfficialSealUseService.cs Wyświetl plik

@@ -127,7 +127,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction


/// <summary>
///
/// 审批通过
/// </summary>
/// <param name="keyValue">主键</param>
public void UpdateStatus(string keyValue, int Status)
@@ -138,13 +138,18 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
OfficialSealUseEntity entity = GetOfficialSealUseEntity(keyValue);
entity.Status = Status;
db.Update(entity);
if (Status == 2)
OfficialSealEntity sealEntity = this.BaseRepository("CollegeMIS")
.FindEntity<OfficialSealEntity>(x => x.Id == entity.SealId);
sealEntity.Status = "1";
db.Update(sealEntity);

if (Status == 2)//审批通过
{
OfficialSealRecordEntity RecordEntity = new OfficialSealRecordEntity();
RecordEntity.Create();
RecordEntity.SealId = entity.SealId;
RecordEntity.SealType = entity.Type;
RecordEntity.Status = 1;
RecordEntity.Status = 1;//借出
RecordEntity.ApplyUserId = entity.ApplyUserId;
RecordEntity.ApplyUserName = entity.ApplyUserName;
RecordEntity.ApplyTime = DateTime.Now;
@@ -165,6 +170,9 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
}
}



/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


Ładowanie…
Anuluj
Zapisz