Bladeren bron

【修改】补助种类管理:增加取消提交按钮;

新疆警官学校中职
dyy 2 weken geleden
bovenliggende
commit
02d7df512e
10 gewijzigde bestanden met toevoegingen van 150 en 5 verwijderingen
  1. +22
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/SW_Ask_TypeController.cs
  2. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Type/Index.cshtml
  3. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Type/Index.js
  4. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/database.config
  5. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Batch_Type/SW_Ask_Batch_TypeBLL.cs
  6. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Batch_Type/SW_Ask_Batch_TypeIBLL.cs
  7. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Batch_Type/SW_Ask_Batch_TypeService.cs
  8. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Main/SW_Ask_MainBLL.cs
  9. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Main/SW_Ask_MainIBLL.cs
  10. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Main/SW_Ask_MainService.cs

+ 22
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Controllers/SW_Ask_TypeController.cs Bestand weergeven

@@ -18,6 +18,9 @@ namespace Learun.Application.Web.Areas.StudentWork.Controllers
public class SW_Ask_TypeController : MvcControllerBase
{
private SW_Ask_TypeIBLL sW_Ask_TypeIBLL = new SW_Ask_TypeBLL();
private SW_Ask_MainIBLL sW_Ask_MainIBLL = new SW_Ask_MainBLL();
private SW_Ask_Batch_TypeIBLL sW_Ask_Batch_TypeIBLL = new SW_Ask_Batch_TypeBLL();
private SW_Ask_NotHaveAll_TypeIBLL sW_Ask_NotHaveAll_TypeIBLL = new SW_Ask_NotHaveAll_TypeBLL();

#region 视图功能

@@ -173,6 +176,25 @@ namespace Learun.Application.Web.Areas.StudentWork.Controllers
/// <returns></returns>
public ActionResult ModifyStatus(string keyValue, int status, string processId)
{
if (status == 0)
{
var mainList = sW_Ask_MainIBLL.GetSW_Ask_MainListByTId(keyValue);
if (mainList.Any())
{
return Fail("该类型在使用中,无法取消!");
}
var batchList = sW_Ask_Batch_TypeIBLL.GetListByTId(keyValue);
if (batchList.Any())
{
return Fail("该类型在使用中,无法取消!");
}
var nothaveList = sW_Ask_NotHaveAll_TypeIBLL.GetListByTId(keyValue);
if (nothaveList.Any())
{
return Fail("该类型在使用中,无法取消!");
}
}

sW_Ask_TypeIBLL.ModifyStatus(keyValue, status, processId);
return Success("提交成功!");
}


+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Type/Index.cshtml Bestand weergeven

@@ -40,8 +40,9 @@
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 提交</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 查看</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;提交</a>
<a id="lr_submitcancel" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp;取消提交</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;查看</a>
</div>
</div>
</div>


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/StudentWork/Views/SW_Ask_Type/Index.js Bestand weergeven

@@ -113,6 +113,24 @@ var bootstrap = function ($, learun) {
});
}
});
// 取消提交
$('#lr_submitcancel').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var TStatus = $('#gridtable').jfGridValue('TStatus');
if (TStatus !== 1) {
learun.alert.warning("当前记录未提交!");
return false;
}
learun.layerConfirm('是否确认取消提交该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/StudentWork/SW_Ask_Type/ModifyStatus', { keyValue: keyValue, status: 0 }, function () {
refreshGirdData();
});
}
});
}
});
//  查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/database.config Bestand weergeven

@@ -18,8 +18,8 @@
<add name="CollegeMIS" connectionString="Server=112.45.152.8;Initial Catalog=NewCollegeMIS;User ID=sa;Password=qj@2018" providerName="System.Data.SqlClient" />
<add name="hangfireString" connectionString="Server=112.45.152.8;Initial Catalog=HangFire;User ID=sa;Password=qj@2018" providerName="System.Data.SqlClient" />-->
<!--长阳-->
<add name="BaseDb" connectionString="Server=123.57.209.16;Initial Catalog=adms7ultimate2_新疆司法;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_新疆司法;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="hangfireString" connectionString="Server=123.57.209.16;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="BaseDb" connectionString="Server=8.141.155.183,53314;Initial Catalog=adms7ultimate2_新疆司法;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="CollegeMIS" connectionString="Server=8.141.155.183,53314;Initial Catalog=CollegeMIS_新疆司法;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />
<add name="hangfireString" connectionString="Server=8.141.155.183,53314;Initial Catalog=Hangfire;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" />

</connectionStrings>

+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Batch_Type/SW_Ask_Batch_TypeBLL.cs Bestand weergeven

@@ -63,6 +63,29 @@ namespace Learun.Application.TwoDevelopment.StudentWork
}
}
}
/// <summary>
/// 获取列表数据
/// <summary>
/// <returns></returns>
public IEnumerable<SW_Ask_Batch_TypeEntity> GetListByTId(string TId)
{
try
{
return sW_Ask_Batch_TypeService.GetListByTId(TId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// <param name="pagination">分页参数</param>


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Batch_Type/SW_Ask_Batch_TypeIBLL.cs Bestand weergeven

@@ -27,6 +27,11 @@ namespace Learun.Application.TwoDevelopment.StudentWork
/// <returns></returns>
IEnumerable<SW_Ask_Batch_TypeEntity> GetListByBId(string BId);
/// <summary>
/// 获取列表数据
/// <summary>
/// <returns></returns>
IEnumerable<SW_Ask_Batch_TypeEntity> GetListByTId(string TId);
/// <summary>
/// 获取列表分页数据
/// <param name="pagination">分页参数</param>
/// <summary>


+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Batch_Type/SW_Ask_Batch_TypeService.cs Bestand weergeven

@@ -80,6 +80,29 @@ namespace Learun.Application.TwoDevelopment.StudentWork
}
}

/// <summary>
/// 获取列表数据
/// <summary>
/// <returns></returns>
public IEnumerable<SW_Ask_Batch_TypeEntity> GetListByTId(string TId)
{
try
{
return this.BaseRepository().FindList<SW_Ask_Batch_TypeEntity>(x => x.TId == TId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// <param name="pagination">分页参数</param>


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Main/SW_Ask_MainBLL.cs Bestand weergeven

@@ -163,6 +163,30 @@ namespace Learun.Application.TwoDevelopment.StudentWork
}
}
}

/// <summary>
/// 获取SW_Ask_Main表实体数据
/// <param name="tId">种类Id</param>
/// <summary>
/// <returns></returns>
public IEnumerable<SW_Ask_MainEntity> GetSW_Ask_MainListByTId(string tId)
{
try
{
return ask_MainService.GetSW_Ask_MainListByTId(tId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Main/SW_Ask_MainIBLL.cs Bestand weergeven

@@ -39,6 +39,12 @@ namespace Learun.Application.TwoDevelopment.StudentWork
SW_Ask_MainEntity GetSW_Ask_MainEntityAndQuestionsResult(string keyValue, string smid);

SW_Ask_MainEntity GetSW_Ask_MainEntityAndQuestionsResult(string processId);
/// <summary>
/// 获取SW_Ask_Main表实体数据
/// <param name="tId">种类Id</param>
/// <summary>
/// <returns></returns>
IEnumerable<SW_Ask_MainEntity> GetSW_Ask_MainListByTId(string tId);
#endregion

#region 提交数据


+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/StudentWork/SW_Ask_Main/SW_Ask_MainService.cs Bestand weergeven

@@ -325,6 +325,29 @@ namespace Learun.Application.TwoDevelopment.StudentWork
}
}

/// <summary>
/// 获取SW_Ask_Main表实体数据
/// <param name="tId">种类Id</param>
/// <summary>
/// <returns></returns>
public IEnumerable<SW_Ask_MainEntity> GetSW_Ask_MainListByTId(string tId)
{
try
{
return BaseRepository().FindList<SW_Ask_MainEntity>(x => x.TId == tId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据


Laden…
Annuleren
Opslaan