@@ -0,0 +1,117 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-11 11:57 | |||
/// 描 述:基础信息采集 | |||
/// </summary> | |||
public class FD_BudgetFileController : MvcControllerBase | |||
{ | |||
private FD_BudgetFileIBLL fD_BudgetFileIBLL = new FD_BudgetFileBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = fD_BudgetFileIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var FD_BudgetFileData = fD_BudgetFileIBLL.GetFD_BudgetFileEntity( keyValue ); | |||
var jsonData = new { | |||
FD_BudgetFile = FD_BudgetFileData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
fD_BudgetFileIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
FD_BudgetFileEntity entity = strEntity.ToObject<FD_BudgetFileEntity>(); | |||
fD_BudgetFileIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,31 @@ | |||
@{ | |||
ViewBag.Title = "基础信息采集"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||
<div class="lr-form-item-title">年度</div> | |||
<div id="YearNo" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||
<div class="lr-form-item-title">月份</div> | |||
<div id="MouthNo" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||
<div class="lr-form-item-title">接收部门</div> | |||
<div id="DeptId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||
<div class="lr-form-item-title">材料名称</div> | |||
<input id="FileName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="Url" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetFile" > | |||
<div class="lr-form-item-title">说明</div> | |||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/FD_BudgetFile/Form.js") |
@@ -0,0 +1,76 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-08-11 11:57 | |||
* 描 述:基础信息采集 | |||
*/ | |||
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 () { | |||
//年度 | |||
$('#YearNo').lrselect({ | |||
placeholder: "请选择年度", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#MouthNo').lrDataItemSelect({ code: 'MPMonth' }); | |||
$('#DeptId').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name', maxHeight: 200 }); | |||
//$('#MPDepartment').lrselect({ | |||
// type: 'tree', | |||
// // 展开最大高度 | |||
// maxHeight: 200, | |||
// // 是否允许搜索 | |||
// allowSearch: true, | |||
// // 访问数据接口地址 | |||
// url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||
// select: function (val) { | |||
// var departmentIds = val.id; | |||
// $('#MPReceiveUser').lrselectRefresh({ | |||
// url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentIds?departmentId=' + departmentIds | |||
// }) | |||
// } | |||
//}); | |||
$('#Url').lrUploader(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/FD_BudgetFile/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 + '/PersonnelManagement/FD_BudgetFile/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -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> | |||
<div id="YearNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">月份</div> | |||
<div id="MouthNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">材料名称</div> | |||
<input id="FileName" type="text" class="form-control" /> | |||
</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_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/FD_BudgetFile/Index.js") |
@@ -0,0 +1,173 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-08-11 11:57 | |||
* 描 述:基础信息采集 | |||
*/ | |||
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); | |||
//年度 | |||
$('#YearNo').lrselect({ | |||
placeholder: "请选择年度", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#MouthNo').lrDataItemSelect({ code: 'MPMonth' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/PersonnelManagement/FD_BudgetFile/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)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/PersonnelManagement/FD_BudgetFile/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/FD_BudgetFile/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
//$('.fileurl').on('click', function () { | |||
// console.log("下载!!!"); | |||
// var id = $(this).id; | |||
// top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: id, __RequestVerificationToken: top.$.lrToken }, method: 'POST' }); | |||
//}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/PersonnelManagement/FD_BudgetFile/GetPageList', | |||
headData: [ | |||
{ | |||
label: "年度", name: "YearNo", width: 100, align: "left" | |||
//formatterAsync: function (callback, value, row, op,$cell) { | |||
// learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: '', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
// }); | |||
//} | |||
}, | |||
{ | |||
label: "月份", name: "MouthNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'MPMonth', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "接收部门", name: "DeptId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "材料名称", name: "FileName", width: 100, align: "left" }, | |||
//{ | |||
// label: "附件", name: "Url", width: 200, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// $.ajax({ | |||
// url: '/LR_SystemModule/Annexes/GetAnnexesFileList', | |||
// data: { folderId: value }, | |||
// type: 'GET', | |||
// dataType: "json", | |||
// async: false, | |||
// cache: false, | |||
// success: function (res) { | |||
// var bb = ''; | |||
// //console.log(res); | |||
// $.each(res.data, function (i, item) { | |||
// bb += '<span onclick="downLoad(\'' + | |||
// item.F_Id + | |||
// '\',)" style="color:blue">' + | |||
// item.F_FileName + | |||
// '</span>, '; | |||
// }) | |||
// callback(bb); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ label: "说明", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
}, | |||
downLoad: function (fileId) { | |||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: top.$.lrToken }, method: 'POST' }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} | |||
@@ -0,0 +1,159 @@ | |||
using System; | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-27 17:42 | |||
/// 描 述:基础信息上报 | |||
/// </summary> | |||
public class FD_BudgetBasicsController : MvcControllerBase | |||
{ | |||
private FD_BudgetBasicsIBLL fD_BudgetBasicsIBLL = new FD_BudgetBasicsBLL(); | |||
private DepartmentIBLL departmentIBLL = new DepartmentBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
var userInfo = LoginUserInfo.Get(); | |||
ViewBag.Name = userInfo.realName; | |||
var dept = departmentIBLL.GetEntity(userInfo.departmentId); | |||
ViewBag.Dept = dept == null ? "" : dept.F_FullName; | |||
ViewBag.Date = DateTime.Now; | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = fD_BudgetBasicsIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var FD_BudgetBasicsData = fD_BudgetBasicsIBLL.GetFD_BudgetBasicsEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
FD_BudgetBasics = FD_BudgetBasicsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var FD_BudgetBasicsData = fD_BudgetBasicsIBLL.GetFormDataByProcessId(processId); | |||
var jsonData = new | |||
{ | |||
FD_BudgetBasics = FD_BudgetBasicsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
var entity = fD_BudgetBasicsIBLL.GetFD_BudgetBasicsEntity(keyValue); | |||
entity.BIsDelete = true; | |||
entity.BDeleteTime = DateTime.Now; | |||
entity.BDeleteUser = LoginUserInfo.Get().userId; | |||
fD_BudgetBasicsIBLL.SaveEntity(keyValue, entity); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
FD_BudgetBasicsEntity entity = strEntity.ToObject<FD_BudgetBasicsEntity>(); | |||
fD_BudgetBasicsIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 提交资助变更 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult ChangeStatusById(string keyValue, string processId) | |||
{ | |||
fD_BudgetBasicsIBLL.ChangeStatusById(keyValue, 1, processId); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,180 @@ | |||
using System; | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 10:40 | |||
/// 描 述:收入预算管理 | |||
/// </summary> | |||
public class FD_IncomeManageController : MvcControllerBase | |||
{ | |||
private FD_IncomeManageIBLL fD_IncomeManageIBLL = new FD_IncomeManageBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form2() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form3() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = fD_IncomeManageIBLL.GetPageList(paginationobj, queryJson); | |||
//FD_IncomeManageEntity entity = new FD_IncomeManageEntity();// data.Sum(x=>x.IAmount) | |||
//entity.IName = "总计:"; | |||
//entity.IActual = data.Sum(x => x.IActual); | |||
//entity.IQuota = data.Sum(x => x.IQuota); | |||
//entity.IAmount = data.Sum(x => x.IAmount); | |||
//entity.IUseAmount = data.Sum(x => x.IUseAmount); | |||
//entity.ISurplusAmount = data.Sum(x => x.ISurplusAmount); | |||
//var list = data.ToList(); | |||
//list.Add(entity); | |||
var jsonData = new | |||
{ | |||
rows = data,// list, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var FD_IncomeManageData = fD_IncomeManageIBLL.GetFD_IncomeManageEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
FD_IncomeManage = FD_IncomeManageData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetTree() | |||
{ | |||
var data = fD_IncomeManageIBLL.GetTree(); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
var entity = fD_IncomeManageIBLL.GetFD_IncomeManageEntity(keyValue); | |||
entity.IIsDelete = true; | |||
entity.IDeleteTime = DateTime.Now; | |||
entity.IDeleteUser = LoginUserInfo.Get().userId; | |||
fD_IncomeManageIBLL.SaveEntity(keyValue, entity); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
FD_IncomeManageEntity entity = strEntity.ToObject<FD_IncomeManageEntity>(); | |||
if (entity.IAmount <= 0) | |||
return Fail("金额必须大于0!"); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.IUseAmount = 0; | |||
entity.ISurplusAmount = entity.IAmount; | |||
} | |||
else | |||
{ | |||
var FD_IncomeManageData = fD_IncomeManageIBLL.GetFD_IncomeManageEntity(keyValue); | |||
entity.IUseAmount = FD_IncomeManageData.IUseAmount; | |||
entity.ISurplusAmount = entity.IAmount - FD_IncomeManageData.IUseAmount; | |||
} | |||
fD_IncomeManageIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,274 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using Learun.Application.WorkFlow; | |||
namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 14:18 | |||
/// 描 述:支出预算管理 | |||
/// </summary> | |||
public class FD_PayManageController : MvcControllerBase | |||
{ | |||
private FD_PayManageIBLL fD_PayManageIBLL = new FD_PayManageBLL(); | |||
private FD_IncomeManageIBLL fD_IncomeManageIBLL = new FD_IncomeManageBLL(); | |||
private NWFTaskIBLL nWFTaskIBLL = new NWFTaskBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 打印 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult PrintSpecial() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 打印 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult PrintPublic() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单(基本承包经费支出) | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormPublic() | |||
{ | |||
ViewBag.Amount = 0; | |||
ViewBag.Name = ""; | |||
var incomlist = fD_IncomeManageIBLL.GetIncomeList("0", "1"); | |||
if (incomlist.Count() > 0) | |||
{ | |||
var model = incomlist.FirstOrDefault(); | |||
ViewBag.Name = model.IName; | |||
ViewBag.Amount = model.ISurplusAmount; | |||
} | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPTypeTree(string keyValue) | |||
{ | |||
var data = fD_PayManageIBLL.GetTree(); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = fD_PayManageIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var FD_PayManageData = fD_PayManageIBLL.GetFD_PayManageEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
FD_PayManage = FD_PayManageData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPrintData(string keyValue, string processId) | |||
{ | |||
var FD_PayManageData = fD_PayManageIBLL.GetFD_PayManageEntity(keyValue); | |||
var TaskLogList = (List<NWFTaskLogEntity>)nWFTaskIBLL.GetLogList(processId); | |||
var jsonData = new | |||
{ | |||
FD_PayManage = FD_PayManageData, | |||
TaskLogList = TaskLogList | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="processId">流程Id</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var FD_PayManageData = fD_PayManageIBLL.GetFormDataByProcessId(processId); | |||
var jsonData = new | |||
{ | |||
FD_PayManage = FD_PayManageData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取收入预算下拉框列表 | |||
/// </summary> | |||
/// <param name=""></param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetIncomeList(string budgetType, string financeBudgetType) | |||
{ | |||
var fD_IncomeManageData = fD_IncomeManageIBLL.GetIncomeList(budgetType, financeBudgetType); | |||
var list = new List<object>(); | |||
foreach (var item in fD_IncomeManageData) | |||
{ | |||
list.Add(new | |||
{ | |||
text = item.IName + "(剩余金额:" + item.ISurplusAmount + ")", | |||
value = item.IId, | |||
}); | |||
} | |||
return Success(list); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
fD_PayManageIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
FD_PayManageEntity entity = strEntity.ToObject<FD_PayManageEntity>(); | |||
//判断资金支出来源对应的收入预算是否存在 | |||
var ITopType = ""; | |||
var ISecondType = ""; | |||
if ((entity.PTopSource == "1" || entity.PTopSource == "2") || entity.PType == "2") | |||
{ | |||
//学校经费 部门专项经费对应公用经费 | |||
ITopType = "0"; | |||
ISecondType = "1"; | |||
} | |||
else if (entity.PTopSource == "3") | |||
{ | |||
//财政专项经费 | |||
ITopType = "0"; | |||
ISecondType = "2"; | |||
} | |||
else if (entity.PTopSource == "4") | |||
{ | |||
//培训收入 | |||
ITopType = "2"; | |||
} | |||
var incomlist = fD_IncomeManageIBLL.GetIncomeList(ITopType, ISecondType); | |||
if (incomlist.Count() <= 0) | |||
return Fail("请先添加对应的收入预算!"); | |||
if (entity.PTopSource == "3" && string.IsNullOrEmpty(entity.PIncomeId)) | |||
{ | |||
//财政专项经费 | |||
return Fail("请选择财政专项名称!"); | |||
} | |||
else | |||
{ | |||
entity.PIncomeId = incomlist.Select(x => x.IId).FirstOrDefault(); | |||
} | |||
fD_PayManageIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 提交 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult ChangeStatusById(string keyValue, string processId) | |||
{ | |||
fD_PayManageIBLL.ChangeStatusById(keyValue, 1, processId); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -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="FD_BudgetBasics"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input type="text" class="form-control" readonly="readonly" value="@ViewBag.Name" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetBasics"> | |||
<div class="lr-form-item-title">部门</div> | |||
<input type="text" class="form-control" readonly="readonly" value="@ViewBag.Dept" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetBasics"> | |||
<div class="lr-form-item-title">当前时间</div> | |||
<input type="text" class="form-control" readonly="readonly" value="@ViewBag.Date" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetBasics"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="BFile"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_BudgetBasics"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="BRemarks" class="form-control" style="height: 100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Form.js") |
@@ -0,0 +1,117 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-05-27 17:42 | |||
* 描 述:基础信息上报 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#BFile').lrUploader(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/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]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
if (id == 'FD_BudgetBasics' && data[id]) { | |||
keyValue = data[id].BId; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
//setTimeout(function () { | |||
// ue.setContent(data[id].F_NewsContent); | |||
//}, 100); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
var strEntity = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
strEntity.BProcessId = processId; | |||
} | |||
postData.strEntity = JSON.stringify(strEntity); | |||
$.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
if (!!processId) { | |||
var res = {}; | |||
res.code = 200; | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
} else { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, strEntity, i); | |||
} | |||
} | |||
}); | |||
}; | |||
// 保存数据 | |||
//acceptClick = function (callBack) { | |||
// if (!$('body').lrValidform()) { | |||
// return false; | |||
// } | |||
// var postData = { | |||
// strEntity: JSON.stringify($('body').lrGetFormData()) | |||
// }; | |||
// $.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// // 保存成功后才回调 | |||
// if (!!callBack) { | |||
// callBack(); | |||
// } | |||
// }); | |||
//}; | |||
page.init(); | |||
} |
@@ -0,0 +1,34 @@ | |||
@{ | |||
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="datesearch"></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_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_eye" class="btn btn-default"><i class="fa fa-eye"></i> <span class="lrlg">查看进度</span></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_BudgetBasics/Index.js") |
@@ -0,0 +1,202 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-05-27 17:42 | |||
* 描 述:基础信息上报 | |||
*/ | |||
var refreshGirdData; | |||
var processId = ''; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var startTime; | |||
var endTime; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 时间搜索框 | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 查看 | |||
$('#lr_eye').on('click', function () { | |||
page.eye(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
top[id].save(); | |||
return location.reload(); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('BId'); | |||
var status = $('#gridtable').jfGridValue('BStatus'); | |||
if (status != 0) { | |||
learun.alert.warning("当前项目已提交,不可修改!"); | |||
return; | |||
} | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
top[id].save(); | |||
return refreshGirdData('', ''); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('BId'); | |||
var status = $('#gridtable').jfGridValue('BStatus'); | |||
if (status != 0) { | |||
learun.alert.warning("当前项目已提交,不可删除!"); | |||
return; | |||
} | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData('', ''); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('BId'); | |||
if (learun.checkrow(keyValue)) { | |||
var status = $('#gridtable').jfGridValue('BStatus'); | |||
if (status != 0) { | |||
learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_BudgetBasics/GetPageList', | |||
headData: [ | |||
{ label: "姓名", name: "BName", width: 100, align: "left" }, | |||
{ | |||
label: '部门', name: 'BDept', width: 100, align: 'left', | |||
formatterAsync: function (callback, value, row) { | |||
learun.clientdata.getAsync('department', { | |||
key: value, | |||
callback: function (item) { | |||
callback(item.name); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "创建时间", name: "BCreateTime", width: 150, align: "left" }, | |||
{ | |||
label: "状态", name: "BStatus", 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>'; | |||
} | |||
} | |||
}, | |||
{ label: "备注", name: "BRemarks", width: 100, align: "left" } | |||
], | |||
mainId: 'BId', | |||
isPage: true | |||
}); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
}, | |||
eye: function () { | |||
var processId = $('#gridtable').jfGridValue('BProcessId') || ''; | |||
if (learun.checkrow(processId)) { | |||
learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看【基础信息上报】', F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId }); | |||
} | |||
} | |||
}; | |||
//refreshGirdData = function () { | |||
// $('#gridtable').jfGridSet('reload'); | |||
//}; | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: 'FD_BudgetBasics',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,38 @@ | |||
@{ | |||
ViewBag.Title = "收入预算管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
@*财政预算-人员经费、公用经费*@ | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title">项目名称<font face="宋体">*</font></div> | |||
<input id="IName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title">预算类型<font face="宋体">*</font></div> | |||
<div id="ITopType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title">预算科目</div> | |||
<div id="ISecondType" ></div> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage"> | |||
<div class="lr-form-item-title">人数</div> | |||
<input id="IPeopleNum" type="number" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title" id="idIQuota">定额<font face="宋体">*</font></div> | |||
<input id="IQuota" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage"> | |||
<div class="lr-form-item-title" id="idIAmount">金额<font face="宋体">*</font></div> | |||
<input id="IAmount" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="IRemarks" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.js") |
@@ -0,0 +1,91 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-05-28 10:40 | |||
* 描 述:收入预算管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var ITopType = request('ITopType'); | |||
var ISecondType = request('ISecondType'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//$('#ITopType').lrDataItemSelect({ | |||
// code: 'BudgetType', select: function (item) { | |||
// if (item) { | |||
// if (item.id == '0' || item.text == '财政预算') { | |||
// $('#ISecondType').removeAttr("readonly"); | |||
// $('#idIQuota').html('定额<font face="宋体">*</font>'); | |||
// document.getElementById("divIActual").style.display = "none"; | |||
// } else { | |||
// $('#IPeopleNum').attr('readonly', 'readonly'); | |||
// $('#ISecondType').lrDataItemSelect({ code: 'financeBudgetType' }); | |||
// $('#ISecondType').attr('readonly', 'readonly'); | |||
// $('#idIQuota').html('年度预计收入<font face="宋体">*</font>'); | |||
// document.getElementById("divIActual").style.display = ""; | |||
// $('#idIAmount').html('金额<font face="宋体">*</font>'); | |||
// } | |||
// } | |||
// } | |||
//}); | |||
//$('#ISecondType').lrDataItemSelect({ code: 'financeBudgetType', select: function(item) { | |||
// if (item) { | |||
// if (item.text == '人员经费') { | |||
// $('#IPeopleNum').removeAttr("readonly"); | |||
// } else { | |||
// $('#IPeopleNum').val(''); | |||
// $('#IPeopleNum').attr('readonly', 'readonly'); | |||
// } | |||
// if (item.text == '财政专项') { | |||
// $('#idIQuota').html('申报金额<font face="宋体">*</font>'); | |||
// $('#idIAmount').html('批复金额<font face="宋体">*</font>'); | |||
// } else { | |||
// $('#spanIQuota').text('定额<font face="宋体">*</font>'); | |||
// $('#idIAmount').html('金额<font face="宋体">*</font>'); | |||
// } | |||
// } | |||
//} }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/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 strEntity = $('body').lrGetFormData(); | |||
strEntity.ITopType = ITopType; | |||
strEntity.ISecondType = ISecondType; | |||
var postData = { | |||
strEntity: JSON.stringify(strEntity) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,37 @@ | |||
@{ | |||
ViewBag.Title = "收入预算管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
@*事业收入、培训收入*@ | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage"> | |||
<div class="lr-form-item-title">项目名称<font face="宋体">*</font></div> | |||
<input id="IName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title">预算类型<font face="宋体">*</font></div> | |||
<div id="ITopType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title">预算科目</div> | |||
<div id="ISecondType" ></div> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" id="divIActual"> | |||
<div class="lr-form-item-title">年度实际收入</div> | |||
<input id="IActual" type="number" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" id="divIActual"> | |||
<div class="lr-form-item-title">年度预计收入</div> | |||
<input id="IQuota" type="number" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage"> | |||
<div class="lr-form-item-title" id="idIAmount">金额<font face="宋体">*</font></div> | |||
<input id="IAmount" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_IncomeManage"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="IRemarks" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.js") |
@@ -0,0 +1,38 @@ | |||
@{ | |||
ViewBag.Title = "收入预算管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
@*财政预算-财政专项*@ | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title">项目编号<font face="宋体">*</font></div> | |||
<input id="IEnCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title">项目名称<font face="宋体">*</font></div> | |||
<input id="IName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title">预算类型<font face="宋体">*</font></div> | |||
<div id="ITopType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title">预算科目</div> | |||
<div id="ISecondType" ></div> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title" id="idIQuota">申报金额<font face="宋体">*</font></div> | |||
<input id="IQuota" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_IncomeManage"> | |||
<div class="lr-form-item-title" id="idIAmount">批复金额<font face="宋体">*</font></div> | |||
<input id="IAmount" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_IncomeManage" > | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="IRemarks" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Form.js") |
@@ -0,0 +1,63 @@ | |||
@{ | |||
ViewBag.Title = "收入预算管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||
<div class="lr-layout-left"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title lrlg ">类型</div> | |||
<div id="dataTree" class="lr-layout-body"></div> | |||
</div> | |||
</div> | |||
<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="IEnCode" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">项目名称</div> | |||
<input id="IName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">预算类型</div> | |||
<div id="ITopType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">预算科目</div> | |||
<div id="ISecondType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">定额</div> | |||
<input id="IQuota" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">金额</div> | |||
<input id="IAmount" type="text" class="form-control" /> | |||
</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_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_IncomeManage/Index.js") |
@@ -0,0 +1,277 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-05-28 10:40 | |||
* 描 述:收入预算管理 | |||
*/ | |||
var refreshGirdData; | |||
var ITopType; | |||
var ISecondType; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
//page.initGird(); | |||
page.bind(); | |||
page.initTree(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 300, 400); | |||
$('#ITopType').lrDataItemSelect({ | |||
code: 'BudgetType', select: function (item) { | |||
if (item) { | |||
if (item.id == '0' || item.text == '财政预算') { | |||
$('#ISecondType').removeAttr("readonly"); | |||
} else { | |||
$('#ISecondType').lrDataItemSelect({ code: 'financeBudgetType' }); | |||
$('#ISecondType').attr('readonly', 'readonly'); | |||
} | |||
} else { | |||
$('#ISecondType').lrDataItemSelect({ code: 'financeBudgetType' }); | |||
$('#ISecondType').attr('readonly', 'readonly'); | |||
} | |||
} | |||
}); | |||
$('#ISecondType').lrDataItemSelect({ code: 'financeBudgetType' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
if (!ITopType) { | |||
learun.alert.warning('请选择类型!'); | |||
return; | |||
} | |||
if (ITopType == '0' && !ISecondType) { | |||
learun.alert.warning('请选择二级类型!'); | |||
return; | |||
} | |||
var url = ''; | |||
if (ITopType == '1' || ITopType == '2') { | |||
//事业收入、培训收入 | |||
url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form2'; | |||
} else if (ITopType == '0' && ISecondType == '2') { | |||
//财政预算 | |||
url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form3'; | |||
} else { | |||
url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form'; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + url + '?ITopType=' + ITopType + '&ISecondType=' + ISecondType, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('IId'); | |||
if (learun.checkrow(keyValue)) { | |||
var url = ''; | |||
if (ITopType == '1' || ITopType == '2') { | |||
//事业收入、培训收入 | |||
url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form2'; | |||
} else if (ITopType == '0' && ISecondType == '2') { | |||
//财政预算 | |||
url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form3'; | |||
} else { | |||
url = '/ReceiveSendFeeManagement/FD_IncomeManage/Form'; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + url + '?keyValue=' + keyValue + '&ITopType=' + ITopType + '&ISecondType=' + ISecondType, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('IId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
initTree: function () { | |||
$('#dataTree').lrtree({ | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/GetTree', | |||
nodeClick: function (item) { | |||
if (item.parent) { | |||
ISecondType = item.value; | |||
ITopType = item.parent.value; | |||
} else { | |||
ITopType = item.value; | |||
ISecondType = ''; | |||
} | |||
page.initGird(); | |||
page.search({ ITopType: ITopType, ISecondType: ISecondType }); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$("#gridtable").empty(); | |||
$("#gridtable")[0].dfop = undefined; | |||
if (ITopType == '1' || ITopType == '2') { | |||
//事业收入、培训收入 | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/GetPageList', | |||
headData: [ | |||
{ label: "项目名称", name: "IName", width: 100, align: "left" }, | |||
{ | |||
label: "预算类型", name: "ITopType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'BudgetType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
//{ label: "项目编号", name: "IEnCode", width: 100, align: "left" }, | |||
{ label: "年度实际收入", name: "IActual", width: 100, align: "left", statistics: true }, | |||
{ label: "年度预计收入", name: "IQuota", width: 150, align: "left", statistics: true }, | |||
{ label: "金额", name: "IAmount", width: 150, align: "left", statistics: true }, | |||
{ label: "使用金额", name: "IUseAmount", width: 150, align: "left", statistics: true }, | |||
{ label: "剩余金额", name: "ISurplusAmount", width: 150, align: "left", statistics: true }, | |||
{ label: "备注", name: "IRemarks", width: 100, align: "left" }, | |||
], | |||
mainId: 'IId', | |||
isPage: true | |||
}); | |||
} else if (ITopType == '0' && ISecondType == '2') { | |||
//财政预算-财政专项 | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/GetPageList', | |||
headData: [ | |||
{ label: "项目名称", name: "IName", width: 100, align: "left" }, | |||
{ label: "项目编号", name: "IEnCode", width: 100, align: "left" }, | |||
{ | |||
label: "预算类型", | |||
name: "ITopType", | |||
width: 100, | |||
align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: value, | |||
code: 'BudgetType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "预算科目", | |||
name: "ISecondType", | |||
width: 100, | |||
align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: value, | |||
code: 'financeBudgetType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "申报金额", name: "IQuota", width: 150, align: "left", statistics: true }, | |||
{ label: "批复金额", name: "IAmount", width: 150, align: "left", statistics: true }, | |||
{ label: "使用金额", name: "IUseAmount", width: 150, align: "left", statistics: true }, | |||
{ label: "剩余金额", name: "ISurplusAmount", width: 150, align: "left", statistics: true }, | |||
{ label: "备注", name: "IRemarks", width: 100, align: "left" } | |||
], | |||
mainId: 'IId', | |||
isPage: true | |||
}); | |||
} | |||
else { | |||
//财政预算-人员经费、公用经费 | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_IncomeManage/GetPageList', | |||
headData: [ | |||
{ label: "项目名称", name: "IName", width: 100, align: "left" }, | |||
{ | |||
label: "预算类型", | |||
name: "ITopType", | |||
width: 100, | |||
align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: value, | |||
code: 'BudgetType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "预算科目", | |||
name: "ISecondType", | |||
width: 100, | |||
align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: value, | |||
code: 'financeBudgetType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
//{ label: "项目编号", name: "IEnCode", width: 100, align: "left" }, | |||
{ label: "人数", name: "IPeopleNum", width: 100, align: "left" }, | |||
{ label: "定额", name: "IQuota", width: 150, align: "left", statistics: true }, | |||
{ label: "金额", name: "IAmount", width: 150, align: "left", statistics: true}, | |||
{ label: "使用金额", name: "IUseAmount", width: 150, align: "left", statistics: true }, | |||
{ label: "剩余金额", name: "ISurplusAmount", width: 150, align: "left", statistics: true}, | |||
{ label: "备注", name: "IRemarks", width: 100, align: "left" }, | |||
], | |||
mainId: 'IId', | |||
isPage: true | |||
}); | |||
} | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,29 @@ | |||
| |||
function smalltoBIG(n) { | |||
var fraction = ['角', '分']; | |||
var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; | |||
var unit = [ | |||
['元', '万', '亿'], | |||
['', '拾', '佰', '仟'] | |||
]; | |||
var head = n < 0 ? '欠' : ''; | |||
n = Math.abs(n); | |||
var s = ''; | |||
for (var i = 0; i < fraction.length; i++) { | |||
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, ''); | |||
} | |||
s = s || '整'; | |||
n = Math.floor(n); | |||
for (var i = 0; i < unit[0].length && n > 0; i++) { | |||
var p = ''; | |||
for (var j = 0; j < unit[1].length && n > 0; j++) { | |||
p = digit[n % 10] + unit[1][j] + p; | |||
n = Math.floor(n / 10); | |||
} | |||
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s; | |||
} | |||
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整'); | |||
} |
@@ -0,0 +1,68 @@ | |||
@{ | |||
ViewBag.Title = "支出预算管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage" style="display: none"> | |||
<div class="lr-form-item-title">报销类型<font face="宋体">*</font></div> | |||
<div id="PType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">付款方式<font face="宋体">*</font></div> | |||
<div id="PPayType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">收款单位</div> | |||
<input id="PPayee" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">开户银行</div> | |||
<input id="PPayeeBank" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">银行账号</div> | |||
<input id="PPayeeBankAccount" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">收款人</div> | |||
<input id="PCollectionUser" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">开卡银行</div> | |||
<input id="PCollectionBank1" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">卡号</div> | |||
<input id="PCollectionBankAccount1" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">开卡银行</div> | |||
<input id="PCollectionBank2" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">卡号</div> | |||
<input id="PCollectionBankAccount2" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">资金支出用途</div> | |||
<textarea id="PPurpose" class="form-control" style="height:80px;" ></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">资金支出来源</div> | |||
<div id="PTopSource" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">财政专项名称</div> | |||
<div id="PIncomeId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage" > | |||
<div class="lr-form-item-title">支出金额<font face="宋体">*</font></div> | |||
<input id="PAmount" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="PFile"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Form.js") |
@@ -0,0 +1,177 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-05-28 14:18 | |||
* 描 述:支出预算管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
//报销类型 | |||
var ptype = request('ptype'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#PFile').lrUploader(); | |||
$('#PType').lrDataItemSelect({ | |||
code: 'payReimburseType', select: function (item) { | |||
if (item) { | |||
if (item.id == '1') { | |||
//基本承包经费外支出 | |||
$('#PTopSource').removeAttr("readonly"); | |||
$('#PIncomeId').removeAttr("readonly"); | |||
} else { | |||
//基本承包经费支出不需要选择资金支出来源 | |||
//$('#PTopSource').html(''); | |||
//$('#PIncomeId').html(''); | |||
$('#PTopSource').attr('readonly', 'readonly'); | |||
$('#PIncomeId').attr('readonly', 'readonly'); | |||
} | |||
} | |||
} | |||
}); | |||
$('#PPayType').lrDataItemSelect({ code: 'fdPayType' }); | |||
$('#PTopSource').lrDataItemSelect({ | |||
code: 'fdPaySource', select: function (item) { | |||
var budgetType = ''; | |||
var financeBudgetType = ''; | |||
if (item) { | |||
if (item.id == '1' || item.id == '2') { | |||
//学校经费 部门专项经费,都走公用经费 | |||
budgetType = '0'; | |||
financeBudgetType = '1'; | |||
} else if (item.id == '3') { | |||
//财政专项经费 | |||
budgetType = '0'; | |||
financeBudgetType = '2'; | |||
} else if (item.id == '4') { | |||
//培训收入 | |||
budgetType = '2'; | |||
} | |||
} | |||
//财政专项名称 | |||
$('#PIncomeId').lrselectRefresh({ | |||
placeholder: "请选择财政专项名称", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=' + budgetType + '&financeBudgetType=' + financeBudgetType, | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//if (item) { | |||
// if (item.id == '3') { | |||
// $('#PIncomeId').removeAttr("readonly"); | |||
// } else { | |||
// $('#PIncomeId').attr('readonly', 'readonly'); | |||
// } | |||
//} | |||
} | |||
}); | |||
//财政专项名称 | |||
$('#PIncomeId').lrselect({ | |||
placeholder: "请选择财政专项名称", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=&financeBudgetType=', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/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]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
if (id == 'FD_PayManage' && data[id]) { | |||
keyValue = data[id].PId; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
if (!!processId) { | |||
var res = {}; | |||
res.code = 200; | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
} else { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
var strEntity = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
strEntity.PProcessId = processId; | |||
} | |||
strEntity.PType = ptype; | |||
postData.strEntity = JSON.stringify(strEntity); | |||
$.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
if (!!processId) { | |||
var res = {}; | |||
res.code = 200; | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
} else { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, strEntity, i); | |||
} | |||
} | |||
}); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,63 @@ | |||
@{ | |||
ViewBag.Title = "基本承包经费支出"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage" style="display: none"> | |||
<div class="lr-form-item-title">报销类型<font face="宋体">*</font></div> | |||
<div id="PType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">付款方式<font face="宋体">*</font></div> | |||
<div id="PPayType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">收款单位</div> | |||
<input id="PPayee" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">开户银行</div> | |||
<input id="PPayeeBank" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">银行账号</div> | |||
<input id="PPayeeBankAccount" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">收款人</div> | |||
<input id="PCollectionUser" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">开卡银行</div> | |||
<input id="PCollectionBank1" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">卡号</div> | |||
<input id="PCollectionBankAccount1" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">开卡银行</div> | |||
<input id="PCollectionBank2" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">卡号</div> | |||
<input id="PCollectionBankAccount2" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">资金支出用途</div> | |||
<textarea id="PPurpose" class="form-control" style="height:80px;"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">报销金额<font face="宋体">*</font></div> | |||
<input id="PAmount" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title"></div> | |||
<span style="font-size: 12px; color: red;">@ViewBag.Name 剩余金额:@ViewBag.Amount</span> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="FD_PayManage"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="PFile"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/FormPublic.js") |
@@ -0,0 +1,166 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-05-28 14:18 | |||
* 描 述:支出预算管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
//报销类型 | |||
var ptype = request('ptype'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#PFile').lrUploader(); | |||
$('#PType').lrDataItemSelect({ | |||
code: 'payReimburseType', select: function (item) { | |||
if (item) { | |||
if (item.id == '1') { | |||
//基本承包经费外支出 | |||
$('#PTopSource').removeAttr("readonly"); | |||
$('#PIncomeId').removeAttr("readonly"); | |||
} else { | |||
//基本承包经费支出不需要选择资金支出来源 | |||
//$('#PTopSource').html(''); | |||
//$('#PIncomeId').html(''); | |||
$('#PTopSource').attr('readonly', 'readonly'); | |||
$('#PIncomeId').attr('readonly', 'readonly'); | |||
} | |||
} | |||
} | |||
}); | |||
$('#PPayType').lrDataItemSelect({ code: 'fdPayType' }); | |||
$('#PTopSource').lrDataItemSelect({ | |||
code: 'fdPaySource', select: function (item) { | |||
var budgetType = ''; | |||
var financeBudgetType = ''; | |||
if (item) { | |||
if (item.id == '1' || item.id == '2') { | |||
//学校经费 部门专项经费,都走公用经费 | |||
budgetType = '0'; | |||
financeBudgetType = '1'; | |||
} else if (item.id == '3') { | |||
//财政专项经费 | |||
budgetType = '0'; | |||
financeBudgetType = '2'; | |||
} else if (item.id == '4') { | |||
//培训收入 | |||
budgetType = '2'; | |||
} | |||
} | |||
//财政专项名称 | |||
$('#PIncomeId').lrselectRefresh({ | |||
placeholder: "请选择财政专项名称", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=' + budgetType + '&financeBudgetType=' + financeBudgetType, | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//if (item) { | |||
// if (item.id == '3') { | |||
// $('#PIncomeId').removeAttr("readonly"); | |||
// } else { | |||
// $('#PIncomeId').attr('readonly', 'readonly'); | |||
// } | |||
//} | |||
} | |||
}); | |||
//财政专项名称 | |||
$('#PIncomeId').lrselect({ | |||
placeholder: "请选择财政专项名称", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=&financeBudgetType=', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/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]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
if (id == 'FD_PayManage' && data[id]) { | |||
keyValue = data[id].PId; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
var strEntity = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
strEntity.PProcessId = processId; | |||
} | |||
strEntity.PType = ptype; | |||
postData.strEntity = JSON.stringify(strEntity); | |||
$.lrSaveForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
if (!!processId) { | |||
var res = {}; | |||
res.code = 200; | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
} else { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, strEntity, i); | |||
} | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,71 @@ | |||
@{ | |||
ViewBag.Title = "支出预算管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||
<div class="lr-layout-left"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title lrlg ">类型</div> | |||
<div id="dataTree" class="lr-layout-body"></div> | |||
</div> | |||
</div> | |||
<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="PType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">付款方式</div> | |||
<div id="PPayType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">收款单位</div> | |||
<input id="PPayee" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">收款人</div> | |||
<input id="PCollectionUser" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">资金支出用途</div> | |||
<input id="PPurpose" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">资金支出来源</div> | |||
<div id="PTopSource"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">支出金额</div> | |||
<input id="PAmount" type="text" class="form-control" /> | |||
</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_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_eye" class="btn btn-default"><i class="fa fa-eye"></i> <span class="lrlg">查看进度</span></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/Index.js") |
@@ -0,0 +1,305 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-05-28 14:18 | |||
* 描 述:支出预算管理 | |||
*/ | |||
var refreshGirdData; | |||
var processId = ''; | |||
var ptype = ''; | |||
var url = ''; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
page.initTree(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#PType').lrDataItemSelect({ code: 'payReimburseType' }); | |||
$('#PPayType').lrDataItemSelect({ code: 'fdPayType' }); | |||
$('#PTopSource').lrDataItemSelect({ code: 'fdPaySource' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
refreshGirdData(); | |||
}); | |||
// 查看 | |||
$('#lr_eye').on('click', function () { | |||
page.eye(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
if (!ptype) { | |||
learun.alert.warning("请选择类型!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + url + '?ptype=' + ptype, | |||
width: 800, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].save('', refreshGirdData()); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('PId'); | |||
var status = $('#gridtable').jfGridValue('PStatus'); | |||
if (status != 0) { | |||
learun.alert.warning("当前项目已提交,不可编辑!"); | |||
return; | |||
} | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + url + '?keyValue=' + keyValue + '&ptype=' + ptype, | |||
width: 800, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].save('', refreshGirdData()); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('PId'); | |||
var status = $('#gridtable').jfGridValue('PStatus'); | |||
if (status != 0) { | |||
learun.alert.warning("当前项目已提交,不可删除!"); | |||
return; | |||
} | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
//$('#gridtable').jqprintTable(); | |||
var keyValue = $('#gridtable').jfGridValue('PId'); | |||
var processId = $('#gridtable').jfGridValue('PProcessId'); | |||
var status = $('#gridtable').jfGridValue('PStatus'); | |||
if (status == '0') { | |||
learun.alert.warning("请先提交当前项目!"); | |||
return; | |||
} | |||
if (learun.checkrow(keyValue)) { | |||
var type = $('#gridtable').jfGridValue('PType'); | |||
//PType 1:基本承包经费外支出--专用经费报销流程; 2:基本承包经费支出--公用经费报销流程 | |||
if (type == '1') { | |||
//基本承包经费外支出 | |||
learun.frameTab.open({ F_ModuleId: keyValue, F_Icon: 'fa magic', F_FullName: '打印【基本承包经费外支出】', F_UrlAddress: '/ReceiveSendFeeManagement/FD_PayManage/PrintSpecial?keyValue=' + keyValue + "&processId=" + processId }); | |||
} | |||
else { | |||
learun.frameTab.open({ F_ModuleId: keyValue, F_Icon: 'fa magic', F_FullName: '打印【基本承包经费支出】', F_UrlAddress: '/ReceiveSendFeeManagement/FD_PayManage/PrintPublic?keyValue=' + keyValue + "&processId=" + processId }); | |||
} | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('PId'); | |||
if (learun.checkrow(keyValue)) { | |||
var status = $('#gridtable').jfGridValue('PStatus'); | |||
if (status != 0) { | |||
learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||
return; | |||
} | |||
var PType = $('#gridtable').jfGridValue('PType'); | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { | |||
refreshGirdData(res, {}, PType); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
initTree: function () { | |||
$('#dataTree').lrtree({ | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetPTypeTree', | |||
nodeClick: function (item) { | |||
ptype = item.value; | |||
url = '/ReceiveSendFeeManagement/FD_PayManage/Form'; | |||
if (ptype == '2') { | |||
//基本承包经费外支出 | |||
url = '/ReceiveSendFeeManagement/FD_PayManage/FormPublic'; | |||
} | |||
page.search({ PType: ptype }); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetPageList', | |||
headData: [ | |||
{ | |||
label: "报销类型", | |||
name: "PType", | |||
width: 160, | |||
align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: value, | |||
code: 'payReimburseType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "报销部门", | |||
name: "PDept", | |||
width: 100, | |||
align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: '报销时间', name: 'PTime', width: 200, align: "left" }, | |||
{ | |||
label: "付款方式", | |||
name: "PPayType", | |||
width: 100, | |||
align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: value, | |||
code: 'fdPayType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "发起人", name: "PUserName", width: 100, align: "left" }, | |||
{ label: "收款单位", name: "PPayee", width: 100, align: "left" }, | |||
{ label: "开户银行", name: "PPayeeBank", width: 100, align: "left" }, | |||
{ label: "银行账号", name: "PPayeeBankAccount", width: 100, align: "left" }, | |||
{ label: "收款人", name: "PCollectionUser", width: 100, align: "left" }, | |||
{ label: "开卡银行", name: "PCollectionBank1", width: 100, align: "left" }, | |||
{ label: "卡号", name: "PCollectionBankAccount1", width: 100, align: "left" }, | |||
{ label: "开卡银行", name: "PCollectionBank2", width: 100, align: "left" }, | |||
{ label: "卡号", name: "PCollectionBankAccount2", width: 100, align: "left" }, | |||
{ label: "资金支出用途", name: "PPurpose", width: 100, align: "left" }, | |||
{ | |||
label: "资金支出来源", | |||
name: "PTopSource", | |||
width: 100, | |||
align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: value, | |||
code: 'fdPaySource', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "财政专项名称", | |||
name: "PIncomeId", | |||
width: 100, | |||
align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'incomeList', | |||
key: value, | |||
keyId: 'iid', | |||
callback: function (_data) { | |||
callback(_data['iname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "支出金额", name: "PAmount", width: 100, align: "left" }, | |||
{ | |||
label: "状态", name: "PStatus", 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>'; | |||
} | |||
} | |||
} | |||
], | |||
mainId: 'PId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
}, | |||
eye: function () { | |||
var processId = $('#gridtable').jfGridValue('PProcessId') || ''; | |||
if (learun.checkrow(processId)) { | |||
learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看【支出预算】', F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId }); | |||
} | |||
} | |||
}; | |||
//refreshGirdData = function () { | |||
// $('#gridtable').jfGridSet('reload'); | |||
//}; | |||
refreshGirdData = function (res, postData, PType) { | |||
if (res && res.code && res.code == 200) { | |||
// 发起流程 | |||
var schemeCode = ''; | |||
//PType 1:基本承包经费外支出--专用经费报销流程; 2:基本承包经费支出--公用经费报销流程 | |||
if (PType == '1') | |||
schemeCode = 'specialUseFunds'; | |||
else | |||
schemeCode = 'publicFunds'; | |||
if (schemeCode) { | |||
var postData = { | |||
schemeCode: schemeCode,// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} | |||
@@ -0,0 +1,59 @@ | |||
@{ | |||
ViewBag.Title = "基本承包经费支出打印"; | |||
Layout = "~/Views/Shared/_SimpleForm.cshtml"; | |||
} | |||
<style> | |||
.list span{ | |||
display: inline-block; | |||
padding-left:25px; | |||
} | |||
.textEm{ | |||
padding-left: 25px; | |||
} | |||
h5,p{ | |||
text-align: center; | |||
padding: 0; | |||
margin: 0; | |||
} | |||
h5{ | |||
font-size: 28px; | |||
margin: 10px 0; | |||
} | |||
p{ | |||
font-size: 18px; | |||
margin-bottom: 10px; | |||
} | |||
tr{ | |||
height: 33px; | |||
} | |||
.lr-query-btn { | |||
position: absolute; | |||
width: 122px; | |||
height: 40px; | |||
line-height: 40px; | |||
cursor: pointer; | |||
border: 1px solid #ccc; | |||
border-radius: 4px; | |||
text-align: center; | |||
color: #fff; | |||
background-color: #039cfd; | |||
border-color: #039cfd; | |||
right: 80px; | |||
top: 40px; | |||
font-size: 18px; | |||
} | |||
</style> | |||
<div id="content"> | |||
<h5>北京金隅科技学校资金支出报销单</h5> | |||
<p>(基本承包经费支出)</p> | |||
<table border="1" height="800" width="90%" cellspacing="0" align="right" id="t1"> | |||
</table> | |||
</div> | |||
<div class="lr-query-btn" id="lr_print">打印</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintPublic.js", "/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/AmountConversion.js") |
@@ -0,0 +1,246 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-05-28 14:18 | |||
* 描 述:支出预算管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var processId = request('processId'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var tableData; | |||
var processInfo; | |||
var html = ''; | |||
var processhtml = ''; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#content').jqprint(); | |||
}); | |||
}, | |||
initData: function () { | |||
$('#t1').html(''); | |||
page.getTableData(keyValue, function (data) { | |||
if (data && data.FD_PayManage) { | |||
tableData = data.FD_PayManage; | |||
//部门 | |||
var deptName = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: tableData.PDept, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
deptName = _data['name']; | |||
} | |||
}); | |||
//付款方式 | |||
var PPayType = ''; | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: tableData.PPayType, | |||
code: 'fdPayType', | |||
callback: function (_data) { | |||
PPayType = _data.text; | |||
} | |||
}); | |||
//资金支出来源 | |||
var topSource = ''; | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: tableData.PTopSource, | |||
code: 'fdPaySource', | |||
callback: function (_data) { | |||
topSource = _data.text; | |||
} | |||
}); | |||
//财政专项名称 | |||
var pIncome = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'incomeList', | |||
key: tableData.PIncomeId, | |||
keyId: 'iid', | |||
callback: function (_data) { | |||
pIncome = _data['iname']; | |||
} | |||
}); | |||
html += '<tr align="center">'; | |||
html += '<td>报销部门</td>'; | |||
html += '<td colspan=4 style="width: 35%;">' + deptName + '</td>'; | |||
html += '<td style="width: 300px;">报销日期</td>'; | |||
html += '<td colspan=2 >' + tableData.PTime + '</td >'; | |||
html += '</tr >'; | |||
html += '<tr align="center">'; | |||
html += '<td>付款方式</td>'; | |||
html += '<td colspan=6>' + PPayType + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr align="center"><td>汇款信息</td><td colspan=3>汇 入 收 款 单 位</td>'; | |||
html += '<td>汇款信息</td><td colspan=2>汇 入 个 人 账 户</td>'; | |||
html += '</tr>'; | |||
html += '<tr align="center">'; | |||
html += '<td>单位名称</td><td colspan=3>' + tableData.PPayee + '</td>'; | |||
html += '<td>收 款 人</td><td colspan=2>' + tableData.PCollectionUser + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr align="center">'; | |||
html += '<td>开户银行</td><td colspan=3>' + tableData.PPayeeBank + '</td>'; | |||
html += '<td>开卡银行</td>'; | |||
html += '<td style="width: 300px;">' + tableData.PCollectionBank1 + '</td><td style="width: 450px;padding:0;margin: 0;">' + tableData.PCollectionBank2 + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr align="center">'; | |||
html += '<td>账 号</td><td colspan=3>' + tableData.PPayeeBankAccount + '</td>'; | |||
html += '<td>卡 号</td><td>' + tableData.PCollectionBankAccount1 + '</td><td>' + tableData.PCollectionBankAccount2 + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr>'; | |||
html += '<td align="center" style="width: 250px;">资金支出用途</td><td colspan=6 class="textEm">' + tableData.PPurpose + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr>'; | |||
html += '<td align="center">报销金额</td>'; | |||
html += '<td colspan=4 class="textEm">大写:' + smalltoBIG(tableData.PAmount) + '</td>'; | |||
html += '<td colspan=2 class="textEm">小写¥:' + tableData.PAmount + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr>'; | |||
html += '<td align="center" rowspan="3">报销审批</td>'; | |||
if (tableData.PRemarks == null || tableData.PRemarks == 'null') { | |||
tableData.PRemarks = ''; | |||
} | |||
html += '<td colspan=4 class="textEm">补充说明:' + tableData.PRemarks + '</td>'; | |||
html += '<td colspan=2 class="textEm">经 办 人:' + tableData.PUserName + '</td>'; | |||
html += '</tr>'; | |||
$('#t1').append(html); | |||
} | |||
if (data && data.TaskLogList) { | |||
processInfo = data.TaskLogList; | |||
//部门领导 | |||
var bmld = ''; | |||
var bmldyj = ''; | |||
var cwcz = ''; | |||
var cwczyj = ''; | |||
processInfo.forEach((item, index) => { | |||
if (item && item.F_NodeId) { | |||
//部门领导 | |||
if (item.F_NodeId == '14c32eaf-9394-4d78-370f-e82e4fc9c73b') { | |||
bmld = item.F_TaskUserName; | |||
if (item.F_Des) { | |||
bmldyj = item.F_Des; | |||
} else { | |||
bmldyj = item.F_OperationName; | |||
} | |||
} | |||
//财务处长审核 | |||
if (item.F_NodeId == '0edd8daa-59ce-60f7-9a99-2f9ed7e62db3') { | |||
cwcz = item.F_TaskUserName; | |||
if (item.F_Des) { | |||
cwczyj = item.F_Des; | |||
} else { | |||
cwczyj = item.F_OperationName; | |||
} | |||
} | |||
} | |||
}); | |||
processhtml += '<tr>'; | |||
processhtml += '<td colspan=4 class="textEm">审核意见:' + bmldyj + '</td>'; | |||
processhtml += '<td colspan=2 class="textEm">部门领导:' + bmld + '</td>'; | |||
processhtml += '</tr>'; | |||
processhtml += '<tr>'; | |||
processhtml += '<td colspan=4 class="textEm">支付意见:' + cwczyj + '</td>'; | |||
processhtml += '<td colspan=2 class="textEm">财务处长:' + cwcz + '</td>'; | |||
processhtml += '</tr>'; | |||
processhtml += '<tr>'; | |||
processhtml += '<td rowspan="2" align="center">所附单据:</td>'; | |||
processhtml += '<td colspan=6 class="list"><span>1.申请 份</span><span>2.发票 张</span><span>3.真伪查验 张</span><span>4.入库单 张</span><span>5.资产验收单 张</span>'; | |||
processhtml += '</td></tr>'; | |||
processhtml += '<tr>'; | |||
processhtml += '<td colspan=6 class="list" class="textEm">'; | |||
processhtml += '<span>6.差旅费保修单 张</span><span>7.其他 张</span>'; | |||
processhtml += '</td></tr>'; | |||
processhtml += '<tr>'; | |||
processhtml += '<td align="center">资金支付</td>'; | |||
processhtml += '<td colspan=4 style="border-right:0;width: 30%;" class="textEm"><span>出纳:</span></td>'; | |||
processhtml += '<td colspan=2 style="border-left:0 ;"><span>复核:</span></td>'; | |||
processhtml += '</tr>'; | |||
$('#t1').append(processhtml); | |||
} | |||
}); | |||
}, | |||
getTableData: function (keyValue, callback) { | |||
learun.httpAsync('GET', top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetPrintData', { keyValue: keyValue, processId: processId }, function (data) { | |||
callback && callback(data); | |||
}); | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
}; | |||
page.init(); | |||
function smalltoBIG(n) { | |||
var fraction = ['角', '分']; | |||
var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; | |||
var unit = [ | |||
['元', '万', '亿'], | |||
['', '拾', '佰', '仟'] | |||
]; | |||
var head = n < 0 ? '欠' : ''; | |||
n = Math.abs(n); | |||
var s = ''; | |||
for (var i = 0; i < fraction.length; i++) { | |||
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, ''); | |||
} | |||
s = s || '整'; | |||
n = Math.floor(n); | |||
for (var i = 0; i < unit[0].length && n > 0; i++) { | |||
var p = ''; | |||
for (var j = 0; j < unit[1].length && n > 0; j++) { | |||
p = digit[n % 10] + unit[1][j] + p; | |||
n = Math.floor(n / 10); | |||
} | |||
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s; | |||
} | |||
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整'); | |||
} | |||
} |
@@ -0,0 +1,63 @@ | |||
@{ | |||
ViewBag.Title = "支出预算管理"; | |||
Layout = "~/Views/Shared/_SimpleForm.cshtml"; | |||
} | |||
<style> | |||
.list span { | |||
display: inline-block; | |||
padding-left: 25px; | |||
/* width: 15%; */ | |||
} | |||
.textEm { | |||
padding-left: 25px; | |||
} | |||
h5, p { | |||
text-align: center; | |||
padding: 0; | |||
margin: 0; | |||
} | |||
h5 { | |||
font-size: 28px; | |||
margin: 10px 0; | |||
} | |||
p { | |||
font-size: 18px; | |||
margin-bottom: 10px; | |||
} | |||
tr { | |||
height: 33px; | |||
} | |||
.lr-query-btn { | |||
position: absolute; | |||
width: 122px; | |||
height: 40px; | |||
line-height: 40px; | |||
cursor: pointer; | |||
border: 1px solid #ccc; | |||
border-radius: 4px; | |||
text-align: center; | |||
color: #fff; | |||
background-color: #039cfd; | |||
border-color: #039cfd; | |||
right: 80px; | |||
top: 40px; | |||
font-size: 18px; | |||
} | |||
</style> | |||
<div id="content"> | |||
<h5>北京金隅科技学校资金支出报销单</h5> | |||
<p>(基本承包经费外支出)</p> | |||
<table border="1" height="800" width="90%" cellspacing="0" align="right" id="t1"> | |||
</table> | |||
</div> | |||
<div class="lr-query-btn" id="lr_print">打印</div> | |||
@Html.AppendJsFile("/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/PrintSpecial.js", "/Areas/ReceiveSendFeeManagement/Views/FD_PayManage/AmountConversion.js") |
@@ -0,0 +1,290 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-05-28 14:18 | |||
* 描 述:支出预算管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var processId = request('processId'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var tableData; | |||
var processInfo; | |||
var html = ''; | |||
var processhtml = ''; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#PType').lrDataItemSelect({ code: 'payReimburseType' }); | |||
$('#PPayType').lrDataItemSelect({ code: 'fdPayType' }); | |||
$('#PTopSource').lrDataItemSelect({ | |||
code: 'fdPaySource', select: function (item) { | |||
var budgetType = ''; | |||
var financeBudgetType = ''; | |||
if (item) { | |||
if (item.text == '学校经费' || item.text == '部门专项经费') { | |||
budgetType = '0'; | |||
financeBudgetType = '1'; | |||
} else if (item.text == '财政专项经费') { | |||
budgetType = '0'; | |||
financeBudgetType = '2'; | |||
} else { | |||
budgetType = '2'; | |||
} | |||
} | |||
//财政专项名称 | |||
$('#PIncomeId').lrselectRefresh({ | |||
placeholder: "请选择财政专项名称", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=' + budgetType + '&financeBudgetType=' + financeBudgetType, | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
} | |||
}); | |||
//财政专项名称 | |||
$('#PIncomeId').lrselect({ | |||
placeholder: "请选择财政专项名称", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=&financeBudgetType=', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#content').jqprint(); | |||
}); | |||
}, | |||
initData: function () { | |||
$('#t1').html(''); | |||
page.getTableData(keyValue, function (data) { | |||
if (data && data.FD_PayManage) { | |||
tableData = data.FD_PayManage; | |||
//部门 | |||
var deptName = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: tableData.PDept, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
deptName = _data['name']; | |||
} | |||
}); | |||
//付款方式 | |||
var PPayType = ''; | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: tableData.PPayType, | |||
code: 'fdPayType', | |||
callback: function (_data) { | |||
PPayType = _data.text; | |||
} | |||
}); | |||
//资金支出来源 | |||
var topSource = ''; | |||
learun.clientdata.getAsync('dataItem', | |||
{ | |||
key: tableData.PTopSource, | |||
code: 'fdPaySource', | |||
callback: function (_data) { | |||
topSource = _data.text; | |||
} | |||
}); | |||
//财政专项名称 | |||
var pIncome = ''; | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'incomeList', | |||
key: tableData.PIncomeId, | |||
keyId: 'iid', | |||
callback: function (_data) { | |||
pIncome = _data['iname']; | |||
} | |||
}); | |||
html += '<tr align="center">'; | |||
html += '<td>报销部门</td>'; | |||
html += '<td colspan=3 style="width: 35%;">' + deptName + '</td>'; | |||
html += '<td style="width: 300px;">报销日期</td>'; | |||
html += '<td colspan=2 >' + tableData.PTime + '</td >'; | |||
html += '</tr >'; | |||
html += '<tr align="center">'; | |||
html += '<td>付款方式</td>'; | |||
html += '<td colspan=6>' + PPayType + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr align="center"><td>汇款信息</td><td colspan=3> 汇 入 收 款 单 位 </td>'; | |||
html += '<td>汇款信息</td><td colspan=2>汇 入 个 人 账 户</td>'; | |||
html += '</tr>'; | |||
html += '<tr align="center">'; | |||
html += '<td>单位名称</td><td colspan=3>' + tableData.PPayee + '</td>'; | |||
html += '<td>收 款 人</td><td colspan=2>' + tableData.PCollectionUser + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr align="center">'; | |||
html += '<td>开户银行</td><td colspan=3>' + tableData.PPayeeBank + '</td>'; | |||
html += '<td>开卡银行</td>'; | |||
html += '<td style="width: 300px;">' + tableData.PCollectionBank1 + '</td><td style="width: 450px;padding:0;margin: 0;">' + tableData.PCollectionBank2 + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr align="center">'; | |||
html += '<td>账 号</td><td colspan=3>' + tableData.PPayeeBankAccount + '</td>'; | |||
html += '<td>卡 号</td><td>' + tableData.PCollectionBankAccount1 + '</td><td>' + tableData.PCollectionBankAccount2 + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr>'; | |||
html += '<td align="center" style="width: 250px;">资金支出用途</td><td colspan=6 class="textEm">' + tableData.PPurpose + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr>'; | |||
html += '<td align="center">资金支出来源</td><td colspan=6 class="textEm">' + topSource + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr>'; | |||
html += '<td align="center">财政专项名称</td><td colspan=6 class="textEm">' + pIncome + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr>'; | |||
html += '<td align="center">支付金额</td>'; | |||
html += '<td colspan=4 class="textEm">大写:' + smalltoBIG(tableData.PAmount) + '</td>'; | |||
html += '<td colspan=2 class="textEm">小写¥:' + tableData.PAmount + '</td>'; | |||
html += '</tr>'; | |||
html += '<tr>'; | |||
html += '<td align="center" rowspan="5">报销审批</td>'; | |||
if (tableData.PRemarks == null || tableData.PRemarks == 'null') { | |||
tableData.PRemarks = ''; | |||
} | |||
html += '<td colspan=4 class="textEm">补充说明:' + tableData.PRemarks + '</td>'; | |||
html += '<td colspan=2 class="textEm">经 办 人:' + tableData.PUserName + '</td>'; | |||
html += '</tr>'; | |||
$('#t1').append(html); | |||
} | |||
if (data && data.TaskLogList) { | |||
processInfo = data.TaskLogList; | |||
//部门领导 | |||
var bmld = ''; | |||
var bmldyj = ''; | |||
var zgxz = ''; | |||
var zgxzyj = ''; | |||
var cwcz = ''; | |||
var cwczyj = ''; | |||
var xz = ''; | |||
var xzyj = ''; | |||
processInfo.forEach((item, index) => { | |||
if (item && item.F_NodeId) { | |||
//部门领导 | |||
if (item.F_NodeId == '4dff56c9-2a91-af36-a384-9da4c6ae85df') { | |||
bmld = item.F_TaskUserName; | |||
if (item.F_Des) { | |||
bmldyj = item.F_Des; | |||
} else { | |||
bmldyj = item.F_OperationName; | |||
} | |||
} | |||
//主管校长审核 | |||
if (item.F_NodeId == '1eb9fdfc-279b-f95f-0696-cd6cfabfb21a') { | |||
zgxz = item.F_TaskUserName; | |||
if (item.F_Des) { | |||
zgxzyj = item.F_Des; | |||
} else { | |||
zgxzyj = item.F_OperationName; | |||
} | |||
} | |||
//财务处长审核 | |||
if (item.F_NodeId == '1d0a2118-e461-9600-e3f4-2a6a6dce7a04') { | |||
cwcz = item.F_TaskUserName; | |||
if (item.F_Des) { | |||
cwczyj = item.F_Des; | |||
} else { | |||
cwczyj = item.F_OperationName; | |||
} | |||
} | |||
//校长审核 | |||
if (item.F_NodeId == 'd96de9d6-8a9c-6142-0cbf-1089e39a5189') { | |||
xz = item.F_TaskUserName; | |||
if (item.F_Des) { | |||
xzyj = item.F_Des; | |||
} else { | |||
xzyj = item.F_OperationName; | |||
} | |||
} | |||
} | |||
}); | |||
processhtml += '<tr>'; | |||
processhtml += '<td colspan=4 class="textEm">审核意见:' + bmldyj + '</td>'; | |||
processhtml += '<td colspan=2 class="textEm">部门领导:' + bmld + '</td>'; | |||
processhtml += '</tr>'; | |||
processhtml += '<tr>'; | |||
processhtml += '<td colspan=4 class="textEm">审核意见:' + zgxzyj + '</td>'; | |||
processhtml += '<td colspan=2 class="textEm">主管校长:' + zgxz + '</td>'; | |||
processhtml += '</tr>'; | |||
processhtml += '<tr>'; | |||
processhtml += '<td colspan=4 class="textEm"> 支付意见:' + cwczyj + '</td>'; | |||
processhtml += '<td colspan=2 class="textEm"> 财务处长:' + cwcz + '</td>'; | |||
processhtml += '</tr>'; | |||
processhtml += '<tr>'; | |||
processhtml += '<td colspan=4 class="textEm">校长批示:' + xzyj + '</td>'; | |||
processhtml += '<td colspan=2 class="textEm">校 长:' + xz + '</td>'; | |||
processhtml += '</tr>'; | |||
processhtml += '<tr>'; | |||
processhtml += '<td rowspan="2" align="center">所附单据:</td>'; | |||
processhtml += '<td colspan=6 class="list"><span>1.申请 份</span><span>2.合同 张</span><span>3.发票 张</span><span>4.证伪查验 张</span><span>5.入库单 张</span>'; | |||
processhtml += '</td></tr>'; | |||
processhtml += '<tr>'; | |||
processhtml += '<td colspan=6 class="list" class="textEm">'; | |||
processhtml += '<span>6.资产验收单 张</span><span>7.差旅费保修单 张</span><span>8.其他 张</span>'; | |||
processhtml += '</td></tr>'; | |||
processhtml += '<tr>'; | |||
processhtml += '<td align="center">资金支付</td>'; | |||
processhtml += '<td colspan=4 style="border-right:0;width: 30%;" class="textEm"><span>出纳:</span></td>'; | |||
processhtml += '<td colspan=2 style="border-left:0 ;"><span>复核:</span></td>'; | |||
processhtml += '</tr>'; | |||
$('#t1').append(processhtml); | |||
} | |||
}); | |||
}, | |||
getTableData: function (keyValue, callback) { | |||
learun.httpAsync('GET', top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetPrintData', { keyValue: keyValue, processId: processId }, function (data) { | |||
callback && callback(data); | |||
}); | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
}; | |||
page.init(); | |||
} |
@@ -484,6 +484,7 @@ | |||
<Compile Include="Areas\Permission\PermissionAreaRegistration.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\EpidemicReportController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\EpidemicSituationCopyController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\FD_BudgetFileController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\MeetingNoticeController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\MP_ManagementPlanController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\MP_PerformanceTrackingController.cs" /> | |||
@@ -493,6 +494,9 @@ | |||
<Compile Include="Areas\PersonnelManagement\Controllers\StuSaverecordController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\TimeTableController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\PersonnelManagementAreaRegistration.cs" /> | |||
<Compile Include="Areas\ReceiveSendFeeManagement\Controllers\FD_BudgetBasicsController.cs" /> | |||
<Compile Include="Areas\ReceiveSendFeeManagement\Controllers\FD_IncomeManageController.cs" /> | |||
<Compile Include="Areas\ReceiveSendFeeManagement\Controllers\FD_PayManageController.cs" /> | |||
<Compile Include="Areas\ReceiveSendFeeManagement\ReceiveSendFeeManagementAreaRegistration.cs" /> | |||
<Compile Include="Areas\StudentWork\Controllers\SW_Ask_MainController.cs" /> | |||
<Compile Include="Areas\StudentWork\Controllers\SW_Ask_Main_QuestionController.cs" /> | |||
@@ -1437,6 +1441,8 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRemove.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormTerminate.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRenew.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\FD_BudgetFile\Form.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\FD_BudgetFile\Index.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\FundExaminer\Form.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\FundExaminer\Index.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\LeagueMember\ModifyForm.js" /> | |||
@@ -1471,6 +1477,16 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\FormView.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\CheckIndex.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_BudgetBasics\Form.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_BudgetBasics\Index.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_IncomeManage\Form.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_IncomeManage\Index.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\AmountConversion.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\Form.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\FormPublic.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\Index.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\PrintPublic.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\PrintSpecial.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerIndex.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\AnswerQuery.js" /> | |||
<Content Include="Areas\StudentWork\Views\SW_Ask_Main\Form.js" /> | |||
@@ -7300,6 +7316,19 @@ | |||
<Content Include="Areas\LR_Desktop\Views\QualityReport\FormView.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\QualityReport\Index.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\QualityReport\IndexReport.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\FD_BudgetFile\Form.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\FD_BudgetFile\Index.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_BudgetBasics\Form.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_BudgetBasics\Index.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_IncomeManage\Form.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_IncomeManage\Form2.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_IncomeManage\Form3.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_IncomeManage\Index.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\Form.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\FormPublic.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\Index.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\PrintPublic.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\PrintSpecial.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | |||
@@ -208,6 +208,7 @@ | |||
<Compile Include="LR_WorkFlow\WfSchemeMap.cs" /> | |||
<Compile Include="LR_WorkFlow\WfTaskHistoryMap.cs" /> | |||
<Compile Include="LR_WorkFlow\WfTaskMap.cs" /> | |||
<Compile Include="PersonnelManagement\FD_BudgetFileMap.cs" /> | |||
<Compile Include="PersonnelManagement\JbjiabanMap.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingNoticeMap.cs" /> | |||
<Compile Include="PersonnelManagement\MP_ManageMentPlanMap.cs" /> | |||
@@ -314,6 +315,9 @@ | |||
<Compile Include="EducationalAdministration\ArrangeExamTermMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuAttendanceLeaveMap.cs" /> | |||
<Compile Include="EducationalAdministration\ArrangeExamStructureMap.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_BudgetBasicsMap.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_IncomeManageMap.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_PayManageMap.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FinaChargeBankMap.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FinaChargeItemMap.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FinaChargesStandardMap.cs" /> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.PersonnelManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-11 11:57 | |||
/// 描 述:基础信息采集 | |||
/// </summary> | |||
public class FD_BudgetFileMap : EntityTypeConfiguration<FD_BudgetFileEntity> | |||
{ | |||
public FD_BudgetFileMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("FD_BUDGETFILE"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-27 17:42 | |||
/// 描 述:基础信息上报 | |||
/// </summary> | |||
public class FD_BudgetBasicsMap : EntityTypeConfiguration<FD_BudgetBasicsEntity> | |||
{ | |||
public FD_BudgetBasicsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("FD_BUDGETBASICS"); | |||
//主键 | |||
this.HasKey(t => t.BId); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 10:40 | |||
/// 描 述:收入预算管理 | |||
/// </summary> | |||
public class FD_IncomeManageMap : EntityTypeConfiguration<FD_IncomeManageEntity> | |||
{ | |||
public FD_IncomeManageMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("FD_INCOMEMANAGE"); | |||
//主键 | |||
this.HasKey(t => t.IId); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 14:18 | |||
/// 描 述:支出预算管理 | |||
/// </summary> | |||
public class FD_PayManageMap : EntityTypeConfiguration<FD_PayManageEntity> | |||
{ | |||
public FD_PayManageMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("FD_PAYMANAGE"); | |||
//主键 | |||
this.HasKey(t => t.PId); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -338,6 +338,10 @@ | |||
<Compile Include="PersonnelManagement\BC_PublishManagement\BC_PublishManagementEntity.cs" /> | |||
<Compile Include="PersonnelManagement\BC_PublishManagement\BC_PublishManagementIBLL.cs" /> | |||
<Compile Include="PersonnelManagement\BC_PublishManagement\BC_PublishManagementService.cs" /> | |||
<Compile Include="PersonnelManagement\FD_BudgetFile\FD_BudgetFileBLL.cs" /> | |||
<Compile Include="PersonnelManagement\FD_BudgetFile\FD_BudgetFileEntity.cs" /> | |||
<Compile Include="PersonnelManagement\FD_BudgetFile\FD_BudgetFileIBLL.cs" /> | |||
<Compile Include="PersonnelManagement\FD_BudgetFile\FD_BudgetFileService.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingNotice\MeetingNoticeBLL.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingNotice\MeetingNoticeEntity.cs" /> | |||
<Compile Include="PersonnelManagement\MeetingNotice\MeetingNoticeIBLL.cs" /> | |||
@@ -397,6 +401,18 @@ | |||
<Compile Include="PersonnelManagement\SRWork\SRWorkIBLL.cs" /> | |||
<Compile Include="PersonnelManagement\SRWork\SRWorkService.cs" /> | |||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_BudgetBasics\FD_BudgetBasicsBLL.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_BudgetBasics\FD_BudgetBasicsEntity.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_BudgetBasics\FD_BudgetBasicsIBLL.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_BudgetBasics\FD_BudgetBasicsService.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_IncomeManage\FD_IncomeManageBLL.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_IncomeManage\FD_IncomeManageEntity.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_IncomeManage\FD_IncomeManageIBLL.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_IncomeManage\FD_IncomeManageService.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_PayManage\FD_PayManageBLL.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_PayManage\FD_PayManageEntity.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_PayManage\FD_PayManageIBLL.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\FD_PayManage\FD_PayManageService.cs" /> | |||
<Compile Include="StudentWork\SW_Ask_Main\SW_Ask_MainBLL.cs" /> | |||
<Compile Include="StudentWork\SW_Ask_Main\SW_Ask_MainEntity.cs" /> | |||
<Compile Include="StudentWork\SW_Ask_Main\SW_Ask_MainIBLL.cs" /> | |||
@@ -0,0 +1,125 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-11 11:57 | |||
/// 描 述:基础信息采集 | |||
/// </summary> | |||
public class FD_BudgetFileBLL : FD_BudgetFileIBLL | |||
{ | |||
private FD_BudgetFileService fD_BudgetFileService = new FD_BudgetFileService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<FD_BudgetFileEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return fD_BudgetFileService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_BudgetFile表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public FD_BudgetFileEntity GetFD_BudgetFileEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return fD_BudgetFileService.GetFD_BudgetFileEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
fD_BudgetFileService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, FD_BudgetFileEntity entity) | |||
{ | |||
try | |||
{ | |||
fD_BudgetFileService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,87 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-11 11:57 | |||
/// 描 述:基础信息采集 | |||
/// </summary> | |||
public class FD_BudgetFileEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 年份 | |||
/// </summary> | |||
[Column("YEARNO")] | |||
public int? YearNo { get; set; } | |||
/// <summary> | |||
/// MouthNo | |||
/// </summary> | |||
[Column("MOUTHNO")] | |||
public int? MouthNo { get; set; } | |||
/// <summary> | |||
/// DeptId | |||
/// </summary> | |||
[Column("DEPTID")] | |||
public string DeptId { get; set; } | |||
/// <summary> | |||
/// FileName | |||
/// </summary> | |||
[Column("FILENAME")] | |||
public string FileName { get; set; } | |||
/// <summary> | |||
/// Url | |||
/// </summary> | |||
[Column("URL")] | |||
public string Url { get; set; } | |||
/// <summary> | |||
/// Remark | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// CreateUserId | |||
/// </summary> | |||
[Column("CREATEUSERID")] | |||
public string CreateUserId { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime=DateTime.Now; | |||
this.CreateUserId = LoginUserInfo.Get().userId; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,48 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-11 11:57 | |||
/// 描 述:基础信息采集 | |||
/// </summary> | |||
public interface FD_BudgetFileIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<FD_BudgetFileEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取FD_BudgetFile表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
FD_BudgetFileEntity GetFD_BudgetFileEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, FD_BudgetFileEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,165 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-08-11 11:57 | |||
/// 描 述:基础信息采集 | |||
/// </summary> | |||
public class FD_BudgetFileService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<FD_BudgetFileEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.YearNo, | |||
t.MouthNo, | |||
t.DeptId, | |||
t.FileName, | |||
t.Url, | |||
t.Remark | |||
"); | |||
strSql.Append(" FROM FD_BudgetFile t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["YearNo"].IsEmpty()) | |||
{ | |||
dp.Add("YearNo",queryParam["YearNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.YearNo = @YearNo "); | |||
} | |||
if (!queryParam["MouthNo"].IsEmpty()) | |||
{ | |||
dp.Add("MouthNo",queryParam["MouthNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MouthNo = @MouthNo "); | |||
} | |||
if (!queryParam["FileName"].IsEmpty()) | |||
{ | |||
dp.Add("FileName", "%" + queryParam["FileName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.FileName Like @FileName "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<FD_BudgetFileEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_BudgetFile表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public FD_BudgetFileEntity GetFD_BudgetFileEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<FD_BudgetFileEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<FD_BudgetFileEntity>(t=>t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, FD_BudgetFileEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,165 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-27 17:42 | |||
/// 描 述:基础信息上报 | |||
/// </summary> | |||
public class FD_BudgetBasicsBLL : FD_BudgetBasicsIBLL | |||
{ | |||
private FD_BudgetBasicsService fD_BudgetBasicsService = new FD_BudgetBasicsService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<FD_BudgetBasicsEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return fD_BudgetBasicsService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_BudgetBasics表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public FD_BudgetBasicsEntity GetFD_BudgetBasicsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return fD_BudgetBasicsService.GetFD_BudgetBasicsEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_BudgetBasics表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public FD_BudgetBasicsEntity GetFormDataByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return fD_BudgetBasicsService.GetFormDataByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
fD_BudgetBasicsService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, FD_BudgetBasicsEntity entity) | |||
{ | |||
try | |||
{ | |||
fD_BudgetBasicsService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void ChangeStatusById(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
fD_BudgetBasicsService.ChangeStatusById(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,101 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-27 17:42 | |||
/// 描 述:基础信息上报 | |||
/// </summary> | |||
public class FD_BudgetBasicsEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 主键 | |||
/// </summary> | |||
[Column("BID")] | |||
public string BId { get; set; } | |||
/// <summary> | |||
/// 姓名 | |||
/// </summary> | |||
[Column("BNAME")] | |||
public string BName { get; set; } | |||
/// <summary> | |||
/// 部门 | |||
/// </summary> | |||
[Column("BDEPT")] | |||
public string BDept { get; set; } | |||
/// <summary> | |||
/// 当前时间 | |||
/// </summary> | |||
[Column("BCREATETIME")] | |||
public DateTime? BCreateTime { get; set; } | |||
/// <summary> | |||
/// 附件 | |||
/// </summary> | |||
[Column("BFILE")] | |||
public string BFile { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("BREMARKS")] | |||
public string BRemarks { get; set; } | |||
/// <summary> | |||
/// 状态 0草稿,1审批中,2已审批,3已拒绝 | |||
/// </summary> | |||
[Column("BSTATUS")] | |||
public int? BStatus { get; set; } | |||
/// <summary> | |||
/// 流程Id | |||
/// </summary> | |||
[Column("BPROCESSID")] | |||
public string BProcessId { get; set; } | |||
/// <summary> | |||
/// 是否删除 | |||
/// </summary> | |||
[Column("BISDELETE")] | |||
public bool? BIsDelete { get; set; } | |||
/// <summary> | |||
/// 删除时间 | |||
/// </summary> | |||
[Column("BDELETETIME")] | |||
public DateTime? BDeleteTime { get; set; } | |||
/// <summary> | |||
/// 删除用户 | |||
/// </summary> | |||
[Column("BDELETEUSER")] | |||
public string BDeleteUser { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.BId = Guid.NewGuid().ToString(); | |||
var userinfo = LoginUserInfo.Get(); | |||
this.BName = userinfo.realName; | |||
this.BDept = userinfo.departmentId; | |||
this.BCreateTime = DateTime.Now; | |||
this.BIsDelete = false; | |||
this.BStatus = 0; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.BId = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,56 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-27 17:42 | |||
/// 描 述:基础信息上报 | |||
/// </summary> | |||
public interface FD_BudgetBasicsIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<FD_BudgetBasicsEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取FD_BudgetBasics表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
FD_BudgetBasicsEntity GetFD_BudgetBasicsEntity(string keyValue); | |||
/// <summary> | |||
/// 获取FD_BudgetBasics表实体数据 | |||
/// </summary> | |||
/// <param name="processId"></param> | |||
/// <returns></returns> | |||
FD_BudgetBasicsEntity GetFormDataByProcessId(string processId); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, FD_BudgetBasicsEntity entity); | |||
void ChangeStatusById(string keyValue, int status, string processId); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,195 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-27 17:42 | |||
/// 描 述:基础信息上报 | |||
/// </summary> | |||
public class FD_BudgetBasicsService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<FD_BudgetBasicsEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.BId, | |||
t.BName, | |||
t.BDept, | |||
t.BCreateTime, | |||
t.BRemarks,t.BStatus,t.BProcessId | |||
"); | |||
strSql.Append(" FROM FD_BudgetBasics t "); | |||
strSql.Append(" WHERE 1=1 and BIsDelete=0 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||
{ | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
strSql.Append(" AND ( t.BCreateTime >= @startTime AND t.BCreateTime <= @endTime ) "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<FD_BudgetBasicsEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_BudgetBasics表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public FD_BudgetBasicsEntity GetFD_BudgetBasicsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<FD_BudgetBasicsEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_BudgetBasics表实体数据 | |||
/// </summary> | |||
/// <param name="processId">流程</param> | |||
/// <returns></returns> | |||
public FD_BudgetBasicsEntity GetFormDataByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<FD_BudgetBasicsEntity>(x => x.BProcessId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<FD_BudgetBasicsEntity>(t => t.BId == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, FD_BudgetBasicsEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改审批状态 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="status"></param> | |||
public void ChangeStatusById(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
BaseRepository("CollegeMis").ExecuteBySql("update FD_BudgetBasics set BStatus=" + status + ",BProcessId='" + processId + "' where BId='" + keyValue + "'", null); | |||
} | |||
catch (Exception ex) | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,205 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 10:40 | |||
/// 描 述:收入预算管理 | |||
/// </summary> | |||
public class FD_IncomeManageBLL : FD_IncomeManageIBLL | |||
{ | |||
private FD_IncomeManageService fD_IncomeManageService = new FD_IncomeManageService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<FD_IncomeManageEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return fD_IncomeManageService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_IncomeManage表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<FD_IncomeManageEntity> GetIncomeList(string budgetType, string financeBudgetType) | |||
{ | |||
try | |||
{ | |||
return fD_IncomeManageService.GetIncomeList(budgetType, financeBudgetType); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_IncomeManage表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public FD_IncomeManageEntity GetFD_IncomeManageEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return fD_IncomeManageService.GetFD_IncomeManageEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取左侧树形数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
public List<TreeModel> GetTree() | |||
{ | |||
try | |||
{ | |||
DataTable list = fD_IncomeManageService.GetSqlTree("BudgetType"); | |||
DataTable childlist = fD_IncomeManageService.GetSqlTree("financeBudgetType"); | |||
List<TreeModel> treeList = new List<TreeModel>(); | |||
foreach (DataRow item in list.Rows) | |||
{ | |||
TreeModel node = new TreeModel | |||
{ | |||
id = item["f_itemdetailid"].ToString(), | |||
text = item["f_itemname"].ToString(), | |||
value = item["f_itemvalue"].ToString(), | |||
showcheck = false, | |||
checkstate = 0, | |||
isexpand = true, | |||
parentId = "" | |||
}; | |||
treeList.Add(node); | |||
} | |||
foreach (DataRow item in childlist.Rows) | |||
{ | |||
TreeModel node = new TreeModel | |||
{ | |||
id = item["f_itemdetailid"].ToString(), | |||
text = item["f_itemname"].ToString(), | |||
value = item["f_itemvalue"].ToString(), | |||
showcheck = false, | |||
checkstate = 0, | |||
isexpand = true, | |||
parentId = "6f52162a-1886-457a-a080-6f8d1156c5df" | |||
}; | |||
treeList.Add(node); | |||
} | |||
return treeList.ToTree(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
fD_IncomeManageService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, FD_IncomeManageEntity entity) | |||
{ | |||
try | |||
{ | |||
fD_IncomeManageService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,136 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 10:40 | |||
/// 描 述:收入预算管理 | |||
/// </summary> | |||
public class FD_IncomeManageEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 主键 | |||
/// </summary> | |||
[Column("IID")] | |||
public string IId { get; set; } | |||
/// <summary> | |||
/// 一级分类 | |||
/// </summary> | |||
[Column("ITOPTYPE")] | |||
public string ITopType { get; set; } | |||
/// <summary> | |||
/// 二级分类 | |||
/// </summary> | |||
[Column("ISECONDTYPE")] | |||
public string ISecondType { get; set; } | |||
/// <summary> | |||
/// 项目名称 | |||
/// </summary> | |||
[Column("INAME")] | |||
public string IName { get; set; } | |||
/// <summary> | |||
/// 项目编号 | |||
/// </summary> | |||
[Column("IENCODE")] | |||
public string IEnCode { get; set; } | |||
/// <summary> | |||
/// 人数 | |||
/// </summary> | |||
[Column("IPEOPLENUM")] | |||
public int? IPeopleNum { get; set; } | |||
/// <summary> | |||
/// 定额/申报金额/年度预计收入 | |||
/// </summary> | |||
[Column("IQUOTA")] | |||
public decimal? IQuota { get; set; } | |||
/// <summary> | |||
/// 年度实际收入 | |||
/// </summary> | |||
[Column("IACTUAL")] | |||
public decimal? IActual { get; set; } | |||
/// <summary> | |||
/// 金额/批复金额 | |||
/// </summary> | |||
[Column("IAMOUNT")] | |||
public decimal? IAmount { get; set; } | |||
/// <summary> | |||
/// 使用金额 | |||
/// </summary> | |||
[Column("IUSEAMOUNT")] | |||
public decimal? IUseAmount { get; set; } | |||
/// <summary> | |||
/// 剩余金额 | |||
/// </summary> | |||
[Column("ISURPLUSAMOUNT")] | |||
public decimal? ISurplusAmount { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("IREMARKS")] | |||
public string IRemarks { get; set; } | |||
/// <summary> | |||
/// 创建时间 | |||
/// </summary> | |||
[Column("ICREATETIME")] | |||
public DateTime? ICreateTime { get; set; } | |||
/// <summary> | |||
/// 创建用户 | |||
/// </summary> | |||
[Column("ICREATEUSERNAME")] | |||
public string ICreateUserName { get; set; } | |||
/// <summary> | |||
/// 创建用户 | |||
/// </summary> | |||
[Column("ICREATEUSERID")] | |||
public string ICreateUserId { get; set; } | |||
/// <summary> | |||
/// 是否删除 | |||
/// </summary> | |||
[Column("IISDELETE")] | |||
public bool? IIsDelete { get; set; } | |||
/// <summary> | |||
/// 删除时间 | |||
/// </summary> | |||
[Column("IDELETETIME")] | |||
public DateTime? IDeleteTime { get; set; } | |||
/// <summary> | |||
/// 删除用户 | |||
/// </summary> | |||
[Column("IDELETEUSER")] | |||
public string IDeleteUser { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.IId = Guid.NewGuid().ToString(); | |||
this.IIsDelete = false; | |||
this.ICreateTime=DateTime.Now; | |||
var userinfo = LoginUserInfo.Get(); | |||
this.ICreateUserId = userinfo.userId; | |||
this.ICreateUserName = userinfo.realName; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.IId = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,55 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 10:40 | |||
/// 描 述:收入预算管理 | |||
/// </summary> | |||
public interface FD_IncomeManageIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<FD_IncomeManageEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<FD_IncomeManageEntity> GetIncomeList(string budgetType, string financeBudgetType); | |||
/// <summary> | |||
/// 获取FD_IncomeManage表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
FD_IncomeManageEntity GetFD_IncomeManageEntity(string keyValue); | |||
/// <summary> | |||
/// 左侧树结构 | |||
/// </summary> | |||
/// <returns></returns> | |||
List<TreeModel> GetTree(); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, FD_IncomeManageEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,237 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 10:40 | |||
/// 描 述:收入预算管理 | |||
/// </summary> | |||
public class FD_IncomeManageService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<FD_IncomeManageEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.IId, | |||
t.IEnCode, | |||
t.IName, | |||
t.ITopType, | |||
t.ISecondType, | |||
t.IPeopleNum, | |||
t.IQuota, | |||
t.IAmount, | |||
t.IActual, | |||
t.IRemarks, | |||
isnull(t.IUseAmount,0) as IUseAmount, | |||
isnull(t.ISurplusAmount,0) as ISurplusAmount | |||
"); | |||
strSql.Append(" FROM FD_IncomeManage t "); | |||
strSql.Append(" WHERE 1=1 and IIsDelete<>1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["IEnCode"].IsEmpty()) | |||
{ | |||
dp.Add("IEnCode", "%" + queryParam["IEnCode"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.IEnCode Like @IEnCode "); | |||
} | |||
if (!queryParam["IName"].IsEmpty()) | |||
{ | |||
dp.Add("IName", "%" + queryParam["IName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.IName Like @IName "); | |||
} | |||
if (!queryParam["ITopType"].IsEmpty()) | |||
{ | |||
dp.Add("ITopType", queryParam["ITopType"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ITopType = @ITopType "); | |||
} | |||
if (!queryParam["ISecondType"].IsEmpty()) | |||
{ | |||
dp.Add("ISecondType", queryParam["ISecondType"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ISecondType = @ISecondType "); | |||
} | |||
if (!queryParam["IQuota"].IsEmpty()) | |||
{ | |||
dp.Add("IQuota", "%" + queryParam["IQuota"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.IQuota Like @IQuota "); | |||
} | |||
if (!queryParam["IAmount"].IsEmpty()) | |||
{ | |||
dp.Add("IAmount", "%" + queryParam["IAmount"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.IAmount Like @IAmount "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<FD_IncomeManageEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_IncomeManage列表 | |||
/// </summary> | |||
/// <param name=""></param> | |||
/// <returns></returns> | |||
public IEnumerable<FD_IncomeManageEntity> GetIncomeList(string budgetType, string financeBudgetType) | |||
{ | |||
try | |||
{ | |||
var sql = "select IId,ITopType,ISurplusAmount,ISecondType,IName,IEnCode from [dbo].[FD_IncomeManage] WHERE IIsDelete=0 "; | |||
if (!string.IsNullOrEmpty(budgetType)) | |||
sql += $" and ITopType='{budgetType}' "; | |||
if (!string.IsNullOrEmpty(financeBudgetType)) | |||
sql += $" and ISecondType='{financeBudgetType}'"; | |||
return this.BaseRepository("CollegeMIS").FindList<FD_IncomeManageEntity>(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_IncomeManage表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public FD_IncomeManageEntity GetFD_IncomeManageEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<FD_IncomeManageEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取树形数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
public DataTable GetSqlTree(string ItemCode) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindTable($" SELECT * FROM dbo.LR_Base_DataItemDetail WHERE F_ItemId= (SELECT F_ItemId FROM dbo.LR_Base_DataItem WHERE F_ItemCode ='{ItemCode}') "); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<FD_IncomeManageEntity>(t => t.IId == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, FD_IncomeManageEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,231 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 14:18 | |||
/// 描 述:支出预算管理 | |||
/// </summary> | |||
public class FD_PayManageBLL : FD_PayManageIBLL | |||
{ | |||
private FD_PayManageService fD_PayManageService = new FD_PayManageService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取左侧树形数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
public List<TreeModel> GetTree() | |||
{ | |||
try | |||
{ | |||
DataTable list = fD_PayManageService.GetSqlTree(); | |||
List<TreeModel> treeList = new List<TreeModel>(); | |||
foreach (DataRow item in list.Rows) | |||
{ | |||
TreeModel node = new TreeModel | |||
{ | |||
id = item["f_itemvalue"].ToString(), | |||
text = item["f_itemname"].ToString(), | |||
value = item["f_itemvalue"].ToString(), | |||
showcheck = false, | |||
checkstate = 0, | |||
isexpand = true, | |||
parentId = "" | |||
}; | |||
treeList.Add(node); | |||
} | |||
return treeList.ToTree(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<FD_PayManageEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return fD_PayManageService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_PayManage表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public FD_PayManageEntity GetFD_PayManageEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return fD_PayManageService.GetFD_PayManageEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_PayManage表实体数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
public FD_PayManageEntity GetFormDataByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return fD_PayManageService.GetFormDataByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
fD_PayManageService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, FD_PayManageEntity entity) | |||
{ | |||
try | |||
{ | |||
fD_PayManageService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 提交 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="status"></param> | |||
/// <param name="processId"></param> | |||
public void ChangeStatusById(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
fD_PayManageService.ChangeStatusById(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void ChangeStatusByProcessId(string processId, int status) | |||
{ | |||
try | |||
{ | |||
fD_PayManageService.ChangeStatusByProcessId(processId, status); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,188 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 14:18 | |||
/// 描 述:支出预算管理 | |||
/// </summary> | |||
public class FD_PayManageEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 主键 | |||
/// </summary> | |||
[Column("PID")] | |||
public string PId { get; set; } | |||
/// <summary> | |||
/// 支出报销类型 | |||
/// </summary> | |||
[Column("PTYPE")] | |||
public string PType { get; set; } | |||
/// <summary> | |||
/// 报销部门 | |||
/// </summary> | |||
[Column("PDEPT")] | |||
public string PDept { get; set; } | |||
/// <summary> | |||
/// 报销时间 | |||
/// </summary> | |||
[Column("PTIME")] | |||
public DateTime? PTime { get; set; } | |||
/// <summary> | |||
/// 报销用户 | |||
/// </summary> | |||
[Column("PUSERNAME")] | |||
public string PUserName { get; set; } | |||
/// <summary> | |||
/// 报销用户 | |||
/// </summary> | |||
[Column("PUSERID")] | |||
public string PUserId { get; set; } | |||
/// <summary> | |||
/// 付款方式 | |||
/// </summary> | |||
[Column("PPAYTYPE")] | |||
public string PPayType { get; set; } | |||
/// <summary> | |||
/// 付款类型,收款单位/个人账户 | |||
/// </summary> | |||
[Column("PPAYMOLD")] | |||
public int? PPayMold { get; set; } | |||
/// <summary> | |||
/// 收款单位名称 | |||
/// </summary> | |||
[Column("PPAYEE")] | |||
public string PPayee { get; set; } | |||
/// <summary> | |||
/// 收款单位银行 | |||
/// </summary> | |||
[Column("PPAYEEBANK")] | |||
public string PPayeeBank { get; set; } | |||
/// <summary> | |||
/// 收款单位账户 | |||
/// </summary> | |||
[Column("PPAYEEBANKACCOUNT")] | |||
public string PPayeeBankAccount { get; set; } | |||
/// <summary> | |||
/// 收款人 | |||
/// </summary> | |||
[Column("PCOLLECTIONUSER")] | |||
public string PCollectionUser { get; set; } | |||
/// <summary> | |||
/// 收款人银行1 | |||
/// </summary> | |||
[Column("PCOLLECTIONBANK1")] | |||
public string PCollectionBank1 { get; set; } | |||
/// <summary> | |||
/// 收款人银行账号1 | |||
/// </summary> | |||
[Column("PCOLLECTIONBANKACCOUNT1")] | |||
public string PCollectionBankAccount1 { get; set; } | |||
/// <summary> | |||
/// 收款人银行2 | |||
/// </summary> | |||
[Column("PCOLLECTIONBANK2")] | |||
public string PCollectionBank2 { get; set; } | |||
/// <summary> | |||
/// 收款人银行账号2 | |||
/// </summary> | |||
[Column("PCOLLECTIONBANKACCOUNT2")] | |||
public string PCollectionBankAccount2 { get; set; } | |||
/// <summary> | |||
/// 资金支出用途 | |||
/// </summary> | |||
[Column("PPURPOSE")] | |||
public string PPurpose { get; set; } | |||
/// <summary> | |||
/// 资金支出来源类型 | |||
/// </summary> | |||
[Column("PTOPSOURCE")] | |||
public string PTopSource { get; set; } | |||
/// <summary> | |||
/// 资金支出来源类型2 | |||
/// </summary> | |||
[Column("PSECONDSOURCE")] | |||
public string PSecondSource { get; set; } | |||
/// <summary> | |||
/// 资金支出来源 | |||
/// </summary> | |||
[Column("PINCOMEID")] | |||
public string PIncomeId { get; set; } | |||
/// <summary> | |||
/// 支出金额 | |||
/// </summary> | |||
[Column("PAMOUNT")] | |||
public decimal? PAmount { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("PREMARKS")] | |||
public string PRemarks { get; set; } | |||
/// <summary> | |||
/// 附件 | |||
/// </summary> | |||
[Column("PFILE")] | |||
public string PFile { get; set; } | |||
/// <summary> | |||
/// 状态 0草稿,1审批中,2已通过,3已拒绝 | |||
/// </summary> | |||
[Column("PSTATUS")] | |||
public int? PStatus { get; set; } | |||
/// <summary> | |||
/// 流程Id | |||
/// </summary> | |||
[Column("PPROCESSID")] | |||
public string PProcessId { get; set; } | |||
/// <summary> | |||
/// 是否删除 | |||
/// </summary> | |||
[Column("PISDELETE")] | |||
public bool? PIsDelete { get; set; } | |||
/// <summary> | |||
/// 删除时间 | |||
/// </summary> | |||
[Column("PDELETETIME")] | |||
public DateTime? PDeleteTime { get; set; } | |||
/// <summary> | |||
/// 删除用户 | |||
/// </summary> | |||
[Column("PDELETEUSER")] | |||
public string PDeleteUser { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.PId = Guid.NewGuid().ToString(); | |||
this.PIsDelete = false; | |||
this.PStatus = 0; | |||
this.PTime = DateTime.Now; | |||
var userinfo = LoginUserInfo.Get(); | |||
this.PDept = userinfo.departmentId; | |||
this.PUserName = userinfo.realName; | |||
this.PUserId = userinfo.userId; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.PId = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,68 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 14:18 | |||
/// 描 述:支出预算管理 | |||
/// </summary> | |||
public interface FD_PayManageIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取左侧树结构 | |||
/// </summary> | |||
/// <returns></returns> | |||
List<TreeModel> GetTree(); | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<FD_PayManageEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取FD_PayManage表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
FD_PayManageEntity GetFD_PayManageEntity(string keyValue); | |||
FD_PayManageEntity GetFormDataByProcessId(string processId); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, FD_PayManageEntity entity); | |||
/// <summary> | |||
/// 提交 修改状态 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="status"></param> | |||
/// <param name="processId"></param> | |||
void ChangeStatusById(string keyValue, int status, string processId); | |||
/// <summary> | |||
/// 流程--审核 | |||
/// </summary> | |||
/// <param name="processId"></param> | |||
/// <param name="status"></param> | |||
void ChangeStatusByProcessId(string processId, int status); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,308 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.ReceiveSendFeeManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2021-05-28 14:18 | |||
/// 描 述:支出预算管理 | |||
/// </summary> | |||
public class FD_PayManageService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取树形数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
public DataTable GetSqlTree() | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindTable(" SELECT * FROM dbo.LR_Base_DataItemDetail WHERE F_ItemId= (SELECT F_ItemId FROM dbo.LR_Base_DataItem WHERE F_ItemCode ='payReimburseType') "); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<FD_PayManageEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.PId, | |||
t.PType, | |||
t.PPayType, | |||
t.PPayee, | |||
t.PPayeeBank, | |||
t.PPayeeBankAccount, | |||
t.PCollectionUser, | |||
t.PCollectionBank1, | |||
t.PCollectionBankAccount1, | |||
t.PCollectionBank2, | |||
t.PCollectionBankAccount2, | |||
t.PPurpose, | |||
t.PTopSource, | |||
t.PIncomeId, | |||
t.PAmount, | |||
t.PStatus, | |||
t.PProcessId, | |||
t.PDept, | |||
t.PTime,t.PUserName | |||
"); | |||
strSql.Append(" FROM FD_PayManage t "); | |||
strSql.Append(" WHERE 1=1 and PIsDelete<>1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["PType"].IsEmpty()) | |||
{ | |||
dp.Add("PType", queryParam["PType"].ToString(), DbType.String); | |||
strSql.Append(" AND t.PType = @PType "); | |||
} | |||
if (!queryParam["PPayType"].IsEmpty()) | |||
{ | |||
dp.Add("PPayType", queryParam["PPayType"].ToString(), DbType.String); | |||
strSql.Append(" AND t.PPayType = @PPayType "); | |||
} | |||
if (!queryParam["PPayee"].IsEmpty()) | |||
{ | |||
dp.Add("PPayee", "%" + queryParam["PPayee"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.PPayee Like @PPayee "); | |||
} | |||
if (!queryParam["PCollectionUser"].IsEmpty()) | |||
{ | |||
dp.Add("PCollectionUser", "%" + queryParam["PCollectionUser"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.PCollectionUser Like @PCollectionUser "); | |||
} | |||
if (!queryParam["PPurpose"].IsEmpty()) | |||
{ | |||
dp.Add("PPurpose", "%" + queryParam["PPurpose"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.PPurpose Like @PPurpose "); | |||
} | |||
if (!queryParam["PTopSource"].IsEmpty()) | |||
{ | |||
dp.Add("PTopSource", queryParam["PTopSource"].ToString(), DbType.String); | |||
strSql.Append(" AND t.PTopSource = @PTopSource "); | |||
} | |||
if (!queryParam["PAmount"].IsEmpty()) | |||
{ | |||
dp.Add("PAmount", "%" + queryParam["PAmount"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.PAmount Like @PAmount "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<FD_PayManageEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_PayManage表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public FD_PayManageEntity GetFD_PayManageEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<FD_PayManageEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取FD_PayManage表实体数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
public FD_PayManageEntity GetFormDataByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<FD_PayManageEntity>(x => x.PProcessId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<FD_PayManageEntity>(t => t.PId == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, FD_PayManageEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改状态 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="status"></param> | |||
/// <param name="processId"></param> | |||
public void ChangeStatusById(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
string sql = "update FD_PayManage set PStatus=" + status + ",PProcessId='" + processId + | |||
"' where PId='" + keyValue + "'"; | |||
BaseRepository("CollegeMis").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
/// <summary> | |||
/// 修改审批状态 | |||
/// </summary> | |||
/// <param name="processId"></param> | |||
/// <param name="status"></param> | |||
public void ChangeStatusByProcessId(string processId, int status) | |||
{ | |||
var db = BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
var entity = db.FindEntity<FD_PayManageEntity>(x => x.PProcessId == processId); | |||
//审批通过操作 | |||
if (status == 2) | |||
{ | |||
var incomeEntity = db.FindEntity<FD_IncomeManageEntity>(x => x.IId == entity.PIncomeId); | |||
if (incomeEntity != null) | |||
{ | |||
//使用金额 | |||
if ((incomeEntity.IUseAmount + entity.PAmount) <= incomeEntity.IAmount) | |||
{ | |||
incomeEntity.IUseAmount += entity.PAmount; | |||
incomeEntity.ISurplusAmount = incomeEntity.IAmount - incomeEntity.IUseAmount; | |||
db.Update(incomeEntity); | |||
} | |||
else | |||
{ | |||
status = 0; | |||
} | |||
} | |||
else | |||
{ | |||
status = 0; | |||
} | |||
} | |||
entity.PStatus = status; | |||
db.Update(entity); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
#endregion | |||
} | |||
} |