소스 검색

预算调整

yanshi
zhangli 3 년 전
부모
커밋
1d53021357
9개의 변경된 파일358개의 추가작업 그리고 9개의 파일을 삭제
  1. +45
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/BudgetApplyController.cs
  2. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/FormAdjust.cshtml
  3. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/FormAdjust.js
  4. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/Index.js
  5. +45
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/IndexAdjust.cshtml
  6. +162
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/IndexAdjust.js
  7. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  8. +10
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/BudgetApply/BudgetApplyEntity.cs
  9. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/BudgetApply/BudgetApplyService.cs

+ 45
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/BudgetApplyController.cs 파일 보기

@@ -1,4 +1,5 @@
using Learun.Util;
using System;
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.CustomFunction;
using System.Web.Mvc;
@@ -26,7 +27,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -35,8 +36,25 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
[HttpGet]
public ActionResult Form()
{
return View();
return View();
}/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexAdjust()
{
return View();
}/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormAdjust()
{
return View();
}

#endregion

#region 获取数据
@@ -71,8 +89,9 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var BudgetApplyData = budgetApplyIBLL.GetBudgetApplyEntity( keyValue );
var jsonData = new {
var BudgetApplyData = budgetApplyIBLL.GetBudgetApplyEntity(keyValue);
var jsonData = new
{
BudgetApply = BudgetApplyData,
};
return Success(jsonData);
@@ -109,7 +128,25 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
{
entity.Status = 0;
}
budgetApplyIBLL.SaveEntity(keyValue,entity);
budgetApplyIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
/// <summary>
/// 预算调整
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveAdjustForm(string keyValue, string strEntity)
{
BudgetApplyEntity entity = strEntity.ToObject<BudgetApplyEntity>();
entity.Status = 3;
entity.AdjustTime = DateTime.Now;
entity.AdjustUserId = LoginUserInfo.Get().userId;
budgetApplyIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

@@ -120,12 +157,12 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UpdateStatus(string keyValue,int Status)
public ActionResult UpdateStatus(string keyValue, int Status)
{
budgetApplyIBLL.UpdateStatus(keyValue, Status);
return Success("操作成功!");
}
#endregion

}


+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/FormAdjust.cshtml 파일 보기

@@ -0,0 +1,27 @@
@{
ViewBag.Title = "预算申请";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="BudgetApply" >
<div class="lr-form-item-title">用途<font face="宋体">*</font></div>
<input id="Purpose" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="BudgetApply" >
<div class="lr-form-item-title">申请金额<font face="宋体">*</font></div>
<input id="Amount" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="BudgetApply" >
<div class="lr-form-item-title">备注</div>
<input id="Remark" type="text" class="form-control" />
</div>
@*<div class="col-xs-12 lr-form-item" data-table="BudgetApply" >
<div class="lr-form-item-title">调整时间</div>
<input id="AdjustTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-12 lr-form-item" data-table="BudgetApply" >
<div class="lr-form-item-title">调整用户</div>
<input id="AdjustUserId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>*@
</div>
@Html.AppendJsFile("/Areas/CustomFunction/Views/BudgetApply/FormAdjust.js")

+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/FormAdjust.js 파일 보기

@@ -0,0 +1,53 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-09-14 12:10
* 描 述:预算申请
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
//$('#AdjustTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
//$('#AdjustUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
//$('#AdjustUserId').val(learun.clientdata.get(['userinfo']).realName);
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/CustomFunction/BudgetApply/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/CustomFunction/BudgetApply/SaveAdjustForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/Index.js 파일 보기

@@ -134,6 +134,10 @@ var bootstrap = function ($, learun) {
return '<span class=\"label label-warning\" style=\"cursor: pointer;\">进行中</span>';
} else if (cellvalue == 2) {
return '<span class=\"label label-success\" style=\"cursor: pointer;\">审批通过</span>';
} else if (cellvalue == 4) {
return '<span class=\"label label-warning\" style=\"cursor: pointer;\">正在调整</span>';
} else if (cellvalue == 5) {
return '<span class=\"label label-success\" style=\"cursor: pointer;\">已调整</span>';
}
}



+ 45
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/IndexAdjust.cshtml 파일 보기

@@ -0,0 +1,45 @@
@{
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>
<input id="Purpose" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">申请时间</div>
<div id="CreateTime"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">申请人</div>
<div id="CreateUserId"></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_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;调整</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;提交</a>
<a id="lr_check" 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/BudgetApply/IndexAdjust.js")

+ 162
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/BudgetApply/IndexAdjust.js 파일 보기

@@ -0,0 +1,162 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-09-14 12:10
* 描 述:预算调整
*/
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);
$('#CreateUserId').lrUserSelect(0);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/CustomFunction/BudgetApply/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 2) {
return learun.alert.warning('该项已调整,不可编辑!');
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/CustomFunction/BudgetApply/FormAdjust?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 3) {
return learun.alert.warning('该项已提交!');
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/CustomFunction/BudgetApply/UpdateStatus', { keyValue: keyValue, Status:4 }, function () {
refreshGirdData();
});
}
});
}
});
// 审批
$('#lr_check').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认审批该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/CustomFunction/BudgetApply/UpdateStatus', { keyValue: keyValue, Status: 5 }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/CustomFunction/BudgetApply/GetPageList',
headData: [
{ label: "用途", name: "Purpose", width: 100, align: "left"},
{ label: "申请金额", name: "Amount", width: 100, align: "left"},
{ label: "备注", name: "Remark", 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: "AdjustTime", width: 100, align: "left" },
{
label: "调整人", name: "AdjustUserId", 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: "Status", width: 100, align: "left",
formatter: function (cellvalue) {
//if (cellvalue == 0) {
// return '<span class=\"label label-default\" style=\"cursor: pointer;\">草稿</span>';
//} else if (cellvalue == 1) {
// return '<span class=\"label label-warning\" style=\"cursor: pointer;\">进行中</span>';
//} else if (cellvalue == 2) {
// return '<span class=\"label label-success\" style=\"cursor: pointer;\">审批通过</span>';
//}
if (cellvalue == 3) {
return '<span class=\"label label-default\" style=\"cursor: pointer;\">草稿</span>';
} else if (cellvalue == 4) {
return '<span class=\"label label-warning\" style=\"cursor: pointer;\">调整进行中</span>';
} else if (cellvalue == 5) {
return '<span class=\"label label-success\" style=\"cursor: pointer;\">已调整</span>';
} else {
return '<span class=\"label label-default\" style=\"cursor: pointer;\">未调整</span>';
}
}

}
],
mainId:'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.SqlParameter = ' and Status>=2 ';
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj 파일 보기

@@ -986,6 +986,8 @@
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexTJ.js" />
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexYJ.js" />
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexData.js" />
<Content Include="Areas\CustomFunction\Views\BudgetApply\FormAdjust.js" />
<Content Include="Areas\CustomFunction\Views\BudgetApply\IndexAdjust.js" />
<Content Include="Areas\CustomFunction\Views\CompetitionAward\IndexTJ.js" />
<Content Include="Areas\CustomFunction\Views\ContestCoachGroup\FormPlan.js" />
<Content Include="Areas\CustomFunction\Views\ContestCoachGroup\FormArrange.js" />
@@ -7620,6 +7622,8 @@
<Content Include="Areas\LogisticsManagement\Views\ProjectTypeManage\Index.cshtml" />
<Content Include="Areas\CustomFunction\Views\SecurityCheckManage\Form2.cshtml" />
<Content Include="Areas\CustomFunction\Views\SecurityCheckManage\Index2.cshtml" />
<Content Include="Areas\CustomFunction\Views\BudgetApply\IndexAdjust.cshtml" />
<Content Include="Areas\CustomFunction\Views\BudgetApply\FormAdjust.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" />


+ 10
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/BudgetApply/BudgetApplyEntity.cs 파일 보기

@@ -54,6 +54,16 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
/// </summary>
[Column("CREATEUSERNAME")]
public string CreateUserName { get; set; }
/// <summary>
/// 调整时间
/// </summary>
[Column("ADJUSTTIME")]
public DateTime? AdjustTime { get; set; }
/// <summary>
/// 调整人
/// </summary>
[Column("ADJUSTUSERID")]
public string AdjustUserId { get; set; }
#endregion

#region 扩展操作


+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/BudgetApply/BudgetApplyService.cs 파일 보기

@@ -38,7 +38,9 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
t.Remark,
t.Status,
t.CreateTime,
t.CreateUserId
t.CreateUserId,
t.AdjustTime,
t.AdjustUserId
");
strSql.Append(" FROM BudgetApply t ");
strSql.Append(" WHERE 1=1 ");
@@ -60,6 +62,11 @@ t.Status,
dp.Add("CreateUserId", queryParam["CreateUserId"].ToString(), DbType.String);
strSql.Append(" AND t.CreateUserId = @CreateUserId ");
}
if (!queryParam["SqlParameter"].IsEmpty())
{
strSql.Append(queryParam["SqlParameter"].ToString());
}

return this.BaseRepository("CollegeMIS").FindList<BudgetApplyEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)


불러오는 중...
취소
저장