Sfoglia il codice sorgente

工资导入增加删除功能

西昌分支
北京泉江 1 anno fa
parent
commit
22b7c2f853
6 ha cambiato i file con 56 aggiunte e 13 eliminazioni
  1. +6
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Gz_AmountsController.cs
  2. +9
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Amounts/Index.cshtml
  3. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Index.cshtml
  4. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsBLL.cs
  5. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsIBLL.cs
  6. +18
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsService.cs

+ 6
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/Gz_AmountsController.cs Vedi File

@@ -1,6 +1,7 @@
using Learun.Application.Base.SystemModule;
using Learun.Application.TwoDevelopment.PersonnelManagement;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
@@ -152,7 +153,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers

[HttpGet]
[AjaxOnly]
public ActionResult GetDetail(string userNo,int year,int month)
public ActionResult GetDetail(string userNo, int year, int month)
{
var data = gz_AmountsIBLL.GetAmountsDetail(userNo, year, month, 0);
return Success(data);
@@ -166,11 +167,11 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[HttpGet]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
public ActionResult DeleteForm(string userNo, string year, string month)
{
gz_AmountsIBLL.DeleteEntity(keyValue);
gz_AmountsIBLL.DeleteEntity(userNo, Convert.ToInt32(year), Convert.ToInt32(month));
return Success("删除成功!");
}
/// <summary>
@@ -216,7 +217,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
var items = gz_ItemsIBLL.SyncColumn(useCol);


var res = gz_AmountsIBLL.ExecuteImportExcel(dt,ignoreCol,useCol,items, fileGuid);
var res = gz_AmountsIBLL.ExecuteImportExcel(dt, ignoreCol, useCol, items, fileGuid);

var data = new
{


+ 9
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Amounts/Index.cshtml Vedi File

@@ -39,8 +39,8 @@
<el-col :span="10" style="display: flex;justify-content: right;">
<a v-on:click="refresh" class="btn btn-default" style="margin-right:8px;font-size:14px"><i class="el-icon-refresh"></i></a>
<a class="btn btn-default" v-on:click="detailShow"><i class="el-icon-edit-outline" style="margin-right:4px"></i>查看</a>
<a class="btn btn-default" v-on:click="del"><i class="el-icon-delete" style="margin-right:4px"></i>删除</a>
<a class="btn btn-default" id="lr_import"><i class="el-icon-download" style="margin-right:4px"></i>导入</a>
@*<a class="btn btn-default" v-on:click="del"><i class="el-icon-delete" style="margin-right:4px"></i>删除</a>*@
</el-col>
</el-row>
<div style="height:calc(100% - 80px)">
@@ -236,17 +236,21 @@
},
// 删除
del() {
let ids = this.multipleSelection.map(e => e.id).toString()
if (!ids) {
this.$message.warning('请选择需要删除的数据!')
if (this.multipleSelection.length != 1) {
this.$message.warning('请选择一条数据进行删除!')
return
}
//let ids = this.multipleSelection.map(e => e.id).toString()
//if (!ids) {
// this.$message.warning('请选择需要删除的数据!')
// return
//}
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
let res = await this.NetRequest('/PersonnelManagement/Gz_Amounts/DeleteForm', { keyValue: ids })
let res = await this.NetRequest('/PersonnelManagement/Gz_Amounts/DeleteForm', $.param({ userNo: this.multipleSelection[0].UserNo, year: this.multipleSelection[0].Year, month: this.multipleSelection[0].Month }), 'get')
if (res) {
this.$message.success('删除成功!')
}


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/Gz_Items/Index.cshtml Vedi File

@@ -26,9 +26,9 @@
<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_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>*@
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
@*<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>*@
<a id="lr_show" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;展示/取消</a>
</div>
</div>


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsBLL.cs Vedi File

@@ -228,6 +228,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}
}

public void DeleteEntity(string userNo, int year, int month)
{
try
{
gz_AmountsService.DeleteEntity(userNo, year, month);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsIBLL.cs Vedi File

@@ -45,6 +45,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);

void DeleteEntity(string userNo, int year, int month);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 18
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsService.cs Vedi File

@@ -160,7 +160,24 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}
}

public void DeleteEntity(string userNo, int year, int month)
{
try
{
this.BaseRepository("CollegeMIS").Delete<Gz_AmountsEntity>(t => t.UserNo == userNo && t.Year == year && t.Month == month);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>


Caricamento…
Annulla
Salva