瀏覽代碼

经费预算

master
zhangli 3 年之前
父節點
當前提交
fea0044219
共有 10 個文件被更改,包括 293 次插入30 次删除
  1. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/FundsManageMainController.cs
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/Index.cshtml
  3. +64
    -29
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/Index.js
  4. +36
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexCheck.cshtml
  5. +116
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexCheck.js
  6. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/FundsManageMain/FundsManageMainBLL.cs
  8. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/FundsManageMain/FundsManageMainEntity.cs
  9. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/FundsManageMain/FundsManageMainIBLL.cs
  10. +28
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/FundsManageMain/FundsManageMainService.cs

+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/FundsManageMainController.cs 查看文件

@@ -38,6 +38,16 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexCheck()
{
return View();
}
#endregion

#region 获取数据
@@ -115,6 +125,19 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers

return Success("保存成功!");
}

/// <summary>
/// 修改状态
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UpdateStatus(string keyValue,int Status)
{
fundsManageMainIBLL.UpdateStatus(keyValue, Status);
return Success("保存成功!");
}
#endregion

}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/Index.cshtml 查看文件

@@ -27,6 +27,7 @@
<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_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;提交</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>


+ 64
- 29
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/Index.js 查看文件

@@ -40,7 +40,7 @@ var bootstrap = function ($, learun) {
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save( function () {
res = top[id].save(function () {
page.search();
});
}
@@ -64,7 +64,7 @@ var bootstrap = function ($, learun) {
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save( function () {
res = top[id].save(function () {
page.search();
});
}
@@ -74,13 +74,40 @@ var bootstrap = function ($, learun) {
});
}
});
//查看
$('#lr_look').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form_FundsManageMain',
title: '查看',
url: top.$.rootUrl + '/CustomFunction/FundsManageMain/Form?keyValue=' + keyValue,
width: 900,
height: 650,
btn: null
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/FundsManageMain/DeleteForm', { keyValue: keyValue}, function () {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/FundsManageMain/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/CustomFunction/FundsManageMain/UpdateStatus', { keyValue: keyValue, Status: 1 }, function () {
refreshGirdData();
});
}
@@ -94,41 +121,49 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/CustomFunction/FundsManageMain/GetPageList',
headData: [
{ label: "项目编号", name: "SRProjectBasicId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CommunityInfo',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['communityname']);
}
});
}},
{ label: "总预算", name: "FundsSum", width: 100, align: "left"},
{ label: "申请时间", name: "CreateTime", width: 100, align: "left"},
{ label: "申请人", name: "CreateUserId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}},
{ label: "备注", name: "Remark", width: 100, align: "left"},
{
label: "项目编号", name: "SRProjectBasicCode", width: 100, align: "left"
},
{ label: "总预算", name: "FundsSum", width: 100, align: "left" },
{ label: "申请时间", name: "CreateTime", width: 100, align: "left" },
{
label: "申请人", name: "CreateUserId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{ label: "备注", name: "Remark", width: 100, align: "left" },
{
label: "状态", name: "Status", width: 100, align: "left" ,
formatter: function(cellvalue, row) {
if (cellvalue == 0) {
return "<span class=\"label label-default\">草稿</span>";
} else if (cellvalue == 1){
return "<span class=\"label label-warning\">已提交</span>";
} else if (cellvalue == 2) {
return "<span class=\"label label-success\">审核通过</span>";
} else if (cellvalue == 3) {
return "<span class=\"label label-danger\">审核未通过</span>";
}
}
},
],
mainId:'ID',
mainId: 'ID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {


+ 36
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexCheck.cshtml 查看文件

@@ -0,0 +1,36 @@
@{
ViewBag.Title = "经费预算管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">项目编号</div>
<div id="SRProjectBasicId"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<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_success" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;通过</a>
<a id="lr_fail" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;未通过</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/CustomFunction/Views/FundsManageMain/IndexCheck.js")

+ 116
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/FundsManageMain/IndexCheck.js 查看文件

@@ -0,0 +1,116 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-09-27 11:38
* 描 述:经费预算管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#SRProjectBasicId').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/CustomFunction/SRProjectBasic/GetList',
value: "ID",
text: "EnCode"
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
//通过
$('#lr_success').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.postForm(top.$.rootUrl + '/CustomFunction/FundsManageMain/UpdateStatus', { keyValue: keyValue, Status: 2 }, function () {
refreshGirdData();
});
}
});
}
});
//未通过
$('#lr_fail').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认未通过该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/CustomFunction/FundsManageMain/UpdateStatus', { keyValue: keyValue, Status: 3 }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/CustomFunction/FundsManageMain/GetPageList',
headData: [
{
label: "项目编号", name: "SRProjectBasicCode", width: 100, align: "left"
},
{ label: "总预算", name: "FundsSum", width: 100, align: "left" },
{ label: "申请时间", name: "CreateTime", width: 100, align: "left" },
{
label: "申请人", name: "CreateUserId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{ label: "备注", name: "Remark", width: 100, align: "left" },
{
label: "状态", name: "Status", width: 100, align: "left" ,
formatter: function(cellvalue, row) {
if (cellvalue == 0) {
return "<span class=\"label label-default\">草稿</span>";
} else if (cellvalue == 1){
return "<span class=\"label label-warning\">已提交</span>";
} else if (cellvalue == 2) {
return "<span class=\"label label-success\">审核通过</span>";
} else if (cellvalue == 3) {
return "<span class=\"label label-danger\">审核未通过</span>";
}
}
},
],
mainId: 'ID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.SqlParameter = ' and Status<>0 ';
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj 查看文件

@@ -942,6 +942,7 @@
<Content Include="Areas\AssetManagementSystem\Views\Ass_UserChangeInfo\Index.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_Warning\Form.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_Warning\Index.js" />
<Content Include="Areas\CustomFunction\Views\FundsManageMain\IndexCheck.js" />
<Content Include="Areas\CustomFunction\Views\PaperManage\IndexReport.js" />
<Content Include="Areas\CustomFunction\Views\SRProjectAchievement\IndexYJ.js" />
<Content Include="Areas\CustomFunction\Views\SRProjectBasic\FormNoCompleted.js" />
@@ -7376,6 +7377,7 @@
<Content Include="Areas\CustomFunction\Views\SRProjectBasic\IndexNoCompleted.cshtml" />
<Content Include="Areas\CustomFunction\Views\SRProjectBasic\FormNoCompleted.cshtml" />
<Content Include="Areas\CustomFunction\Views\PaperManage\IndexReport.cshtml" />
<Content Include="Areas\CustomFunction\Views\FundsManageMain\IndexCheck.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" />


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/FundsManageMain/FundsManageMainBLL.cs 查看文件

@@ -94,6 +94,25 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
}

public void UpdateStatus(string keyValue, int Status)
{
try
{
fundsManageMainService.UpdateStatus(keyValue, Status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/FundsManageMain/FundsManageMainEntity.cs 查看文件

@@ -79,6 +79,9 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
#endregion
#region 扩展字段
[NotMapped]
public string SRProjectBasicCode { get; set; }

#endregion
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/FundsManageMain/FundsManageMainIBLL.cs 查看文件

@@ -36,6 +36,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
void UpdateStatus(string keyValue, int Status);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>


+ 28
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/FundsManageMain/FundsManageMainService.cs 查看文件

@@ -37,9 +37,10 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
t.FundsSum,
t.CreateTime,
t.CreateUserId,
t.Remark
t.Remark,t.Status,s.EnCode as SRProjectBasicCode
");
strSql.Append(" FROM FundsManageMain t ");
strSql.Append(" join SRProjectBasic s on t.SRProjectBasicId=s.id ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
@@ -49,6 +50,11 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
dp.Add("SRProjectBasicId",queryParam["SRProjectBasicId"].ToString(), DbType.String);
strSql.Append(" AND t.SRProjectBasicId = @SRProjectBasicId ");
}
if (!queryParam["SqlParameter"].IsEmpty())
{
strSql.Append(queryParam["SqlParameter"].ToString());
}

return this.BaseRepository("CollegeMIS").FindList<FundsManageMainEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
@@ -115,6 +121,27 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
}

public void UpdateStatus(string keyValue, int Status)
{
try
{
string sql = $"update FundsManageMain set Status={Status} where ID='{keyValue}'";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


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


Loading…
取消
儲存