Procházet zdrojové kódy

经费开支申报 明细必填

新疆警官学校中职
ndbs před 1 rokem
rodič
revize
8f5ee40b93
4 změnil soubory, kde provedl 11 přidání a 6 odebrání
  1. +1
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs
  2. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FundsApplyApi.cs
  4. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs

+ 1
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs Zobrazit soubor

@@ -138,13 +138,12 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
List<FundsApplyDetailEntity> detailList = fundsApplyDetailList.ToObject<List<FundsApplyDetailEntity>>();
var code = entity.EnCode;
var savecode = fundsApplyIBLL.SaveCode(entity.EnCode, keyValue);
entity.EnCode = savecode;
var encode = savecode.Substring(13).ToInt();
if (encode > 99)
{
return Fail("保存失败,经费开支单今日数量已超上限,请您明日编辑!");
}
entity.EnCode = savecode;
if (code != entity.EnCode)
{
fundsApplyIBLL.SaveEntity(keyValue, entity, detailList);


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js Zobrazit soubor

@@ -196,6 +196,12 @@ var bootstrap = function ($, learun) {
if (!$('body').lrValidform()) {
return false;
}
var datas = $('#FundsApplyDetail').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("经费开支申报单未包含明细!请先新增明细!");
return false;
}
return true;
return true;
};
// 保存数据


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/FundsApplyApi.cs Zobrazit soubor

@@ -131,13 +131,13 @@ namespace Learun.Application.WebApi
List<FundsApplyDetailEntity> detailList = parameter.fundsApplyDetailList.ToObject<List<FundsApplyDetailEntity>>();
var code = entity.EnCode;
var savecode = fundsApplyIBLL.SaveCode(entity.EnCode, parameter.keyValue);
entity.EnCode = savecode;

var encode = savecode.Substring(13).ToInt();
if (encode > 99)
{
return Fail("保存失败,经费开支单今日数量已超上限,请您明日编辑!");
}
entity.EnCode = savecode;
if (code != entity.EnCode)
{
fundsApplyIBLL.SaveEntity(parameter.keyValue, entity, detailList);


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs Zobrazit soubor

@@ -162,9 +162,9 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
}
public string SaveCode(string Code, string keyValue)
{
var result = "";
var result = Code;
var strSql = new StringBuilder();
strSql.Append(@"select * from FundsApply where 1= 1 and ApplyTime >= '" + DateTime.Now.Date + " and Encode = '" + Code + "''");
strSql.Append(@"select * from FundsApply where 1= 1 and ApplyTime >= '" + DateTime.Now.Date + "' and Encode = '" + Code + "'");
var data = this.BaseRepository("CollegeMIS").FindList<FundsApplyEntity>(strSql.ToString()).FirstOrDefault();
var Codes = "JFKZ_" + CommonHelper.StringTime();
if (data != null && !string.IsNullOrEmpty(data.EnCode))
@@ -173,7 +173,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
{
if (data.Id == keyValue)
{
result = Code;
return result;
}
else if (data.Id != keyValue && Code != data.EnCode)
{


Načítá se…
Zrušit
Uložit